summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2019-09-04 11:02:19 +0200
committerIago Toral <[email protected]>2019-09-12 06:40:04 +0000
commitab341e61f01a3aa24b3918c89eb4f0f5c9b5fb48 (patch)
tree43f18f046254e14bbf20c1a1f32fe51bb1ac80e8 /src/mesa
parent8b1912c20bb0056937fab5af301c073d1d2c3421 (diff)
prog_to_nir: VARYING_SLOT_PSIZ is a scalar
v2: remove stray change (Erik Faye-Lund) Reviewed-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/prog_to_nir.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 84ba708d0be..5289f0cb4f2 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -841,8 +841,9 @@ ptn_add_output_stores(struct ptn_compile *c)
src = nir_channel(b, src, 2);
}
if (c->prog->Target == GL_VERTEX_PROGRAM_ARB &&
- var->data.location == VARYING_SLOT_FOGC) {
- /* result.fogcoord is a single component value */
+ (var->data.location == VARYING_SLOT_FOGC ||
+ var->data.location == VARYING_SLOT_PSIZ)) {
+ /* result.{fogcoord,psiz} is a single component value */
src = nir_channel(b, src, 0);
}
unsigned num_components = glsl_get_vector_elements(var->type);
@@ -929,7 +930,8 @@ setup_registers_and_variables(struct ptn_compile *c)
nir_variable *var = rzalloc(shader, nir_variable);
if ((c->prog->Target == GL_FRAGMENT_PROGRAM_ARB && i == FRAG_RESULT_DEPTH) ||
- (c->prog->Target == GL_VERTEX_PROGRAM_ARB && i == VARYING_SLOT_FOGC))
+ (c->prog->Target == GL_VERTEX_PROGRAM_ARB && i == VARYING_SLOT_FOGC) ||
+ (c->prog->Target == GL_VERTEX_PROGRAM_ARB && i == VARYING_SLOT_PSIZ))
var->type = glsl_float_type();
else
var->type = glsl_vec4_type();