Skip to content

Commit

Permalink
[amdgpu] fix geometry shader unbinding
Browse files Browse the repository at this point in the history
  • Loading branch information
DHrpcs3 committed Jan 25, 2024
1 parent f4adc1e commit b677eb5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions hw/amdgpu/device/src/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4116,9 +4116,14 @@ static void draw(TaskChain &taskSet, QueueRegisters &regs, std::uint32_t count,
pipelineLayout, 0, 1, &descSet, 0, nullptr);

VkShaderStageFlagBits stages[]{VK_SHADER_STAGE_VERTEX_BIT,
VK_SHADER_STAGE_GEOMETRY_BIT,
VK_SHADER_STAGE_FRAGMENT_BIT};
_vkCmdBindShadersEXT(drawCommandBuffer, 1, stages + 0, &vertexShader);
_vkCmdBindShadersEXT(drawCommandBuffer, 1, stages + 1, &fragmentShader);
VkShaderEXT shaders[]{vertexShader, VK_NULL_HANDLE, fragmentShader};

if (primType == kPrimitiveTypeRectList) {
shaders[1] = getPrimTypeRectGeomShader();
}
_vkCmdBindShadersEXT(drawCommandBuffer, std::size(stages), stages, shaders);

if (primType == kPrimitiveTypeRectList) {
VkShaderStageFlagBits stage = VK_SHADER_STAGE_GEOMETRY_BIT;
Expand Down

0 comments on commit b677eb5

Please sign in to comment.