mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
vtn: Use a system value for primitive ID in fragment shaders
Reviewed-by: Mary Guillemard <mary@mary.zone> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40512>
This commit is contained in:
parent
c7472de858
commit
f6beb5efd6
1 changed files with 1 additions and 4 deletions
|
|
@ -907,10 +907,7 @@ vtn_get_builtin_location(struct vtn_builder *b,
|
|||
set_mode_system_value(b, mode);
|
||||
break;
|
||||
case SpvBuiltInPrimitiveId:
|
||||
if (b->shader->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
vtn_assert(*mode == nir_var_shader_in);
|
||||
*location = VARYING_SLOT_PRIMITIVE_ID;
|
||||
} else if (*mode == nir_var_shader_out) {
|
||||
if (*mode == nir_var_shader_out) {
|
||||
*location = VARYING_SLOT_PRIMITIVE_ID;
|
||||
} else {
|
||||
*location = SYSTEM_VALUE_PRIMITIVE_ID;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue