mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
vtn: Handle DepthReplacing correctly
The meaning of DepthReplacing was clarified in https://gitlab.khronos.org/spirv/SPIR-V/-/issues/342 . TLDR: It just means that the shader can write to FragDepth. We should therefore only overwrite depth_layout if it is equal to NONE, since NONE means "not written" and all other modes mean "written" plus some additional information. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10344 Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26876>
This commit is contained in:
parent
0541a57517
commit
8050b89819
1 changed files with 2 additions and 1 deletions
|
|
@ -5252,7 +5252,8 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
|
|||
|
||||
case SpvExecutionModeDepthReplacing:
|
||||
vtn_assert(b->shader->info.stage == MESA_SHADER_FRAGMENT);
|
||||
b->shader->info.fs.depth_layout = FRAG_DEPTH_LAYOUT_ANY;
|
||||
if (b->shader->info.fs.depth_layout == FRAG_DEPTH_LAYOUT_NONE)
|
||||
b->shader->info.fs.depth_layout = FRAG_DEPTH_LAYOUT_ANY;
|
||||
break;
|
||||
case SpvExecutionModeDepthGreater:
|
||||
vtn_assert(b->shader->info.stage == MESA_SHADER_FRAGMENT);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue