prog_to_nir: VARYING_SLOT_PSIZ is a scalar

v2: remove stray change (Erik Faye-Lund)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Iago Toral Quiroga 2019-09-04 11:02:19 +02:00 committed by Iago Toral
parent 8b1912c20b
commit ab341e61f0
1 changed files with 5 additions and 3 deletions

View File

@ -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();