Lines Matching refs:render_pipeline
105 const RenderPipelineInfo& render_pipeline,
110 const RenderPipelineInfo& render_pipeline,
302 const RenderPipelineInfo& render_pipeline, in MapDeviceTextureToHostBuffer() argument
304 const auto width = render_pipeline.pipeline->GetFramebufferWidth(); in MapDeviceTextureToHostBuffer()
305 const auto height = render_pipeline.pipeline->GetFramebufferHeight(); in MapDeviceTextureToHostBuffer()
307 const auto pixelSize = render_pipeline.pipeline->GetColorAttachments()[0] in MapDeviceTextureToHostBuffer()
326 i < render_pipeline.pipeline->GetColorAttachments().size(); i++) { in MapDeviceTextureToHostBuffer()
341 auto& host_texture = render_pipeline.pipeline->GetColorAttachments()[i]; in MapDeviceTextureToHostBuffer()
849 pipeline_map_[pipeline].render_pipeline.reset( in CreatePipeline()
852 pipeline_map_[pipeline].render_pipeline.get()); in CreatePipeline()
864 RenderPipelineInfo* render_pipeline = GetRenderPipeline(command); in DoClearColor() local
865 if (!render_pipeline) in DoClearColor()
868 render_pipeline->clear_color_value = ::dawn::Color{ in DoClearColor()
875 RenderPipelineInfo* render_pipeline = GetRenderPipeline(command); in DoClearStencil() local
876 if (!render_pipeline) in DoClearStencil()
879 render_pipeline->clear_stencil_value = command->GetValue(); in DoClearStencil()
884 RenderPipelineInfo* render_pipeline = GetRenderPipeline(command); in DoClearDepth() local
885 if (!render_pipeline) in DoClearDepth()
888 render_pipeline->clear_depth_value = command->GetValue(); in DoClearDepth()
894 RenderPipelineInfo* render_pipeline = GetRenderPipeline(command); in DoClear() local
895 if (!render_pipeline) in DoClear()
899 result = helper.CreateRenderPipelineDescriptor(*render_pipeline, *device_, in DoClear()
904 *render_pipeline, *device_, texture_views_, ::dawn::LoadOp::Clear); in DoClear()
919 result = MapDeviceTextureToHostBuffer(*render_pipeline, *device_); in DoClear()
930 const RenderPipelineInfo& render_pipeline, in CreateRenderPipelineDescriptor() argument
937 render_pipeline.pipeline->GetColorAttachments()[0].buffer->GetFormat(); in CreateRenderPipelineDescriptor()
946 auto* depthBuffer = render_pipeline.pipeline->GetDepthBuffer().buffer; in CreateRenderPipelineDescriptor()
960 MakeBasicPipelineLayout(device, render_pipeline.bind_group_layouts); in CreateRenderPipelineDescriptor()
967 for (const auto& shader_info : render_pipeline.pipeline->GetShaders()) { in CreateRenderPipelineDescriptor()
981 render_pipeline.pipeline->GetVertexBuffers().size(); in CreateRenderPipelineDescriptor()
997 if (i < render_pipeline.pipeline->GetVertexBuffers().size()) { in CreateRenderPipelineDescriptor()
1000 render_pipeline.pipeline->GetVertexBuffers()[i] in CreateRenderPipelineDescriptor()
1009 render_pipeline.pipeline->GetVertexBuffers()[i].buffer->GetFormat(); in CreateRenderPipelineDescriptor()
1019 if (render_pipeline.pipeline->GetIndexBuffer()) { in CreateRenderPipelineDescriptor()
1021 render_pipeline.pipeline->GetIndexBuffer()->GetFormat(); in CreateRenderPipelineDescriptor()
1031 vertexStage.module = render_pipeline.vertex_shader; in CreateRenderPipelineDescriptor()
1036 fragmentStage.module = render_pipeline.fragment_shader; in CreateRenderPipelineDescriptor()
1062 render_pipeline.pipeline->GetColorAttachments().size(); in CreateRenderPipelineDescriptor()
1072 render_pipeline.pipeline->GetColorAttachments().size(); in CreateRenderPipelineDescriptor()
1099 if (i < render_pipeline.pipeline->GetColorAttachments().size()) { in CreateRenderPipelineDescriptor()
1100 auto* amber_format = render_pipeline.pipeline->GetColorAttachments()[i] in CreateRenderPipelineDescriptor()
1171 const RenderPipelineInfo& render_pipeline, in CreateRenderPassDescriptor() argument
1178 colorAttachmentsInfo[i].clearColor = render_pipeline.clear_color_value; in CreateRenderPassDescriptor()
1181 depthStencilAttachmentInfo.clearDepth = render_pipeline.clear_depth_value; in CreateRenderPassDescriptor()
1182 depthStencilAttachmentInfo.clearStencil = render_pipeline.clear_stencil_value; in CreateRenderPassDescriptor()
1189 render_pipeline.pipeline->GetColorAttachments().size(); in CreateRenderPassDescriptor()
1202 auto* depthBuffer = render_pipeline.pipeline->GetDepthBuffer().buffer; in CreateRenderPassDescriptor()
1217 render_pipeline.pipeline->GetFramebufferWidth(); in CreateRenderPassDescriptor()
1219 render_pipeline.pipeline->GetFramebufferHeight(); in CreateRenderPassDescriptor()
1241 RenderPipelineInfo* render_pipeline = GetRenderPipeline(command); in DoDrawRect() local
1242 if (!render_pipeline) in DoDrawRect()
1244 if (render_pipeline->vertex_buffers.size() > 1) in DoDrawRect()
1254 const uint32_t frameWidth = render_pipeline->pipeline->GetFramebufferWidth(); in DoDrawRect()
1256 render_pipeline->pipeline->GetFramebufferHeight(); in DoDrawRect()
1297 helper.CreateRenderPipelineDescriptor(*render_pipeline, *device_, true, in DoDrawRect()
1299 helper.CreateRenderPassDescriptor(*render_pipeline, *device_, texture_views_, in DoDrawRect()
1312 for (uint32_t i = 0; i < render_pipeline->bind_groups.size(); i++) { in DoDrawRect()
1313 if (render_pipeline->bind_groups[i]) { in DoDrawRect()
1314 pass.SetBindGroup(i, render_pipeline->bind_groups[i], 0, nullptr); in DoDrawRect()
1326 Result result = MapDeviceTextureToHostBuffer(*render_pipeline, *device_); in DoDrawRect()
1338 RenderPipelineInfo* render_pipeline = GetRenderPipeline(command); in DoDrawArrays() local
1339 if (!render_pipeline) in DoDrawArrays()
1343 if (!render_pipeline->index_buffer) in DoDrawArrays()
1351 render_pipeline->index_buffer = CreateBufferFromData( in DoDrawArrays()
1362 *render_pipeline, *device_, false, command->GetPipelineData()); in DoDrawArrays()
1366 *render_pipeline, *device_, texture_views_, ::dawn::LoadOp::Load); in DoDrawArrays()
1386 for (uint32_t i = 0; i < render_pipeline->bind_groups.size(); i++) { in DoDrawArrays()
1387 if (render_pipeline->bind_groups[i]) { in DoDrawArrays()
1388 pass.SetBindGroup(i, render_pipeline->bind_groups[i], 0, nullptr); in DoDrawArrays()
1392 for (uint32_t i = 0; i < render_pipeline->vertex_buffers.size(); i++) { in DoDrawArrays()
1394 render_pipeline->vertex_buffers[i], /* buffer */ in DoDrawArrays()
1398 pass.SetIndexBuffer(render_pipeline->index_buffer, /* buffer */ in DoDrawArrays()
1411 result = MapDeviceTextureToHostBuffer(*render_pipeline, *device_); in DoDrawArrays()
1471 RenderPipelineInfo* render_pipeline = GetRenderPipeline(command); in DoBuffer() local
1472 if (render_pipeline) { in DoBuffer()
1473 auto where = render_pipeline->buffer_map.find({descriptor_set, binding}); in DoBuffer()
1474 if (where != render_pipeline->buffer_map.end()) { in DoBuffer()
1476 dawn_buffer = &render_pipeline->buffers[dawn_buffer_index]; in DoBuffer()
1489 if (!render_pipeline && !compute_pipeline) in DoBuffer()
1511 RenderPipelineInfo* render_pipeline) { in AttachBuffersAndTextures() argument
1513 const uint32_t width = render_pipeline->pipeline->GetFramebufferWidth(); in AttachBuffersAndTextures()
1514 const uint32_t height = render_pipeline->pipeline->GetFramebufferHeight(); in AttachBuffersAndTextures()
1518 render_pipeline->pipeline->GetColorAttachments().size(), -1); in AttachBuffersAndTextures()
1519 for (auto info : render_pipeline->pipeline->GetColorAttachments()) { in AttachBuffersAndTextures()
1521 render_pipeline->pipeline->GetColorAttachments().size()) in AttachBuffersAndTextures()
1534 if (i < render_pipeline->pipeline->GetColorAttachments().size()) { in AttachBuffersAndTextures()
1535 auto* amber_format = render_pipeline->pipeline->GetColorAttachments()[i] in AttachBuffersAndTextures()
1555 auto* depthBuffer = render_pipeline->pipeline->GetDepthBuffer().buffer; in AttachBuffersAndTextures()
1573 render_pipeline->depth_stencil_texture = depth_stencil_texture_; in AttachBuffersAndTextures()
1575 render_pipeline->depth_stencil_texture = depth_stencil_texture_; in AttachBuffersAndTextures()
1580 if (render_pipeline->pipeline->GetIndexBuffer()) { in AttachBuffersAndTextures()
1581 render_pipeline->index_buffer = CreateBufferFromData( in AttachBuffersAndTextures()
1583 render_pipeline->pipeline->GetIndexBuffer()->ValuePtr()->data(), in AttachBuffersAndTextures()
1584 render_pipeline->pipeline->GetIndexBuffer()->GetSizeInBytes(), in AttachBuffersAndTextures()
1589 for (auto& vertex_info : render_pipeline->pipeline->GetVertexBuffers()) { in AttachBuffersAndTextures()
1590 render_pipeline->vertex_buffers.emplace_back(CreateBufferFromData( in AttachBuffersAndTextures()
1596 if (render_pipeline->pipeline->GetPushConstantBuffer().buffer != nullptr) { in AttachBuffersAndTextures()
1612 if (!render_pipeline->pipeline->GetBuffers().empty()) { in AttachBuffersAndTextures()
1614 for (auto& buf_info : render_pipeline->pipeline->GetBuffers()) { in AttachBuffersAndTextures()
1620 for (const auto& buf_info : render_pipeline->pipeline->GetBuffers()) { in AttachBuffersAndTextures()
1646 render_pipeline->buffers.emplace_back( in AttachBuffersAndTextures()
1652 render_pipeline->buffer_map[{buf_info.descriptor_set, buf_info.binding}] = in AttachBuffersAndTextures()
1653 render_pipeline->buffers.size() - 1; in AttachBuffersAndTextures()
1655 render_pipeline->used_descriptor_set.insert(buf_info.descriptor_set); in AttachBuffersAndTextures()
1665 buf_info.binding, render_pipeline->buffers.back(), 0, in AttachBuffersAndTextures()
1674 render_pipeline->bind_group_layouts.push_back(bindGroupLayout); in AttachBuffersAndTextures()
1677 MakeBindGroup(*device_, render_pipeline->bind_group_layouts[i], in AttachBuffersAndTextures()
1679 render_pipeline->bind_groups.push_back(bindGroup); in AttachBuffersAndTextures()
1683 render_pipeline->bind_group_layouts.push_back(bindGroupLayout); in AttachBuffersAndTextures()
1686 MakeBindGroup(*device_, render_pipeline->bind_group_layouts[i], in AttachBuffersAndTextures()
1688 render_pipeline->bind_groups.push_back(bindGroup); in AttachBuffersAndTextures()