tgsi_to_nir: force int type for LAYER output
this otherwise gets confused as a vec4 most of the time Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12709>
This commit is contained in:
parent
1cc8523c5c
commit
3b289c9f30
|
@ -431,6 +431,8 @@ ttn_emit_declaration(struct ttn_compile *c)
|
|||
if (var->data.location == VARYING_SLOT_FOGC ||
|
||||
var->data.location == VARYING_SLOT_PSIZ) {
|
||||
var->type = glsl_float_type();
|
||||
} else if (var->data.location == VARYING_SLOT_LAYER) {
|
||||
var->type = glsl_int_type();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2219,8 +2221,9 @@ ttn_add_output_stores(struct ttn_compile *c)
|
|||
else if (var->data.location == FRAG_RESULT_SAMPLE_MASK)
|
||||
store_value = nir_channel(b, store_value, 0);
|
||||
} else {
|
||||
/* FOGC and PSIZ are scalar values */
|
||||
/* FOGC, LAYER, and PSIZ are scalar values */
|
||||
if (var->data.location == VARYING_SLOT_FOGC ||
|
||||
var->data.location == VARYING_SLOT_LAYER ||
|
||||
var->data.location == VARYING_SLOT_PSIZ) {
|
||||
store_value = nir_channel(b, store_value, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue