Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skallweitNV committed Sep 26, 2024
1 parent 439b0ae commit 6088af7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 21 deletions.
10 changes: 0 additions & 10 deletions YONGQUESTIONS.txt

This file was deleted.

8 changes: 0 additions & 8 deletions src/vulkan/vk-pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,6 @@ Result PipelineImpl::createVKGraphicsPipeline()
dynamicStates.push_back(VK_DYNAMIC_STATE_SCISSOR);
dynamicStates.push_back(VK_DYNAMIC_STATE_STENCIL_REFERENCE);
dynamicStates.push_back(VK_DYNAMIC_STATE_BLEND_CONSTANTS);
// It's not valid to specify VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT when
// the pipeline contains a mesh shader.
if (!m_program->isMeshShaderProgram() &&
m_device->m_api.m_extendedFeatures.extendedDynamicStateFeatures.extendedDynamicState)

{
dynamicStates.push_back(VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT);
}
VkPipelineDynamicStateCreateInfo dynamicStateInfo = {};
dynamicStateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO;
dynamicStateInfo.dynamicStateCount = (uint32_t)dynamicStates.size();
Expand Down
15 changes: 14 additions & 1 deletion src/wgpu/wgpu-command-queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,20 @@ Result CommandQueueImpl::getNativeHandle(NativeHandle* outHandle)

void CommandQueueImpl::waitOnHost()
{
// m_device->m_ctx.api.wgpuQueueOnSubmittedWorkDone(m_queue, nullptr, nullptr);
// Wait for the command buffer to finish executing
// TODO: we should switch to the new async API
{
WGPUQueueWorkDoneStatus status = WGPUQueueWorkDoneStatus_Unknown;
m_device->m_ctx.api.wgpuQueueOnSubmittedWorkDone(
m_queue,
[](WGPUQueueWorkDoneStatus status, void* userdata) { *(WGPUQueueWorkDoneStatus*)userdata = status; },
&status
);
while (status == WGPUQueueWorkDoneStatus_Unknown)
{
m_device->m_ctx.api.wgpuDeviceTick(m_device->m_ctx.device);
}
}
}

Result CommandQueueImpl::waitForFenceValuesOnDevice(GfxCount fenceCount, IFence** fences, uint64_t* waitValues)
Expand Down
2 changes: 1 addition & 1 deletion src/wgpu/wgpu-pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Result PipelineImpl::createRenderPipeline()
Result PipelineImpl::createComputePipeline()
{
ShaderProgramImpl* program = static_cast<ShaderProgramImpl*>(m_program.get());
ShaderProgramImpl::Module* computeModule = program->findModule(SlangStage::SLANG_STAGE_FRAGMENT);
ShaderProgramImpl::Module* computeModule = program->findModule(SlangStage::SLANG_STAGE_COMPUTE);
if (!computeModule)
{
return SLANG_FAIL;
Expand Down
1 change: 0 additions & 1 deletion tests/test-instanced-draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ TEST_CASE("draw-instanced")
DeviceType::D3D12,
DeviceType::Vulkan,
DeviceType::Metal,
DeviceType::WGPU,
}
);
}
Expand Down

0 comments on commit 6088af7

Please sign in to comment.