mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 15:20:17 +01:00
radv: fix fbfetch output with ESO
This fixes a real issue when ESO uses fbfetch output because this was determined after instead of before. This solution isn't the most elegant one but binding graphics shaders earlier would require more work. Let's just handle this specific corner case for now. This fixes dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.custom_resolve.shader_objects.fragment_region* on some GPUs. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38617>
This commit is contained in:
parent
6569acbdf2
commit
930cab7702
1 changed files with 11 additions and 0 deletions
|
|
@ -15723,6 +15723,17 @@ radv_CmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const
|
|||
radv_reset_pipeline_state(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS);
|
||||
radv_mark_descriptors_dirty(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS);
|
||||
|
||||
/* TODO: Try to bind graphics shaders earlier to remove this. */
|
||||
if (bound_stages & VK_SHADER_STAGE_FRAGMENT_BIT) {
|
||||
const struct radv_shader_object *shader_obj = cmd_buffer->state.shader_objs[MESA_SHADER_FRAGMENT];
|
||||
const bool uses_fbfetch_output = shader_obj && shader_obj->shader->info.ps.uses_fbfetch_output;
|
||||
|
||||
if (cmd_buffer->state.uses_fbfetch_output != uses_fbfetch_output) {
|
||||
cmd_buffer->state.uses_fbfetch_output = uses_fbfetch_output;
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_FBFETCH_OUTPUT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Graphics shaders are handled at draw time because of shader variants. */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue