aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-07-07 02:02:38 -0700
committerKenneth Graunke <[email protected]>2016-07-17 19:26:48 -0700
commitac1181ffbef5250cb3b651e047cce5116727c34c (patch)
treeb6aa32932d99fa3dcb15d2435ff63b662b939488 /src/gallium
parente7d96e7685e911b91ce048c6639a4c290faf5d06 (diff)
compiler: Rename INTERP_QUALIFIER_* to INTERP_MODE_*.
Likewise, rename the enum type to glsl_interp_mode. Beyond the GLSL front-end, talking about "interpolation modes" seems more natural than "interpolation qualifiers" - in the IR, we're removed from how exactly the source language specifies how to interpolate an input. Also, SPIR-V calls these "decorations" rather than "qualifiers". Generated by: $ find . -regextype egrep -regex '.*\.(c|cpp|h)' -type f -exec sed -i \ -e 's/INTERP_QUALIFIER_/INTERP_MODE_/g' \ -e 's/glsl_interp_qualifier/glsl_interp_mode/g' {} \; Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/nir/tgsi_to_nir.c6
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_program.c2
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_program.c2
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c6
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_shader.h2
5 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index e2b305ecb37..e1d7c682bf6 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -353,13 +353,13 @@ ttn_emit_declaration(struct ttn_compile *c)
*/
switch (decl->Interp.Interpolate) {
case TGSI_INTERPOLATE_CONSTANT:
- var->data.interpolation = INTERP_QUALIFIER_FLAT;
+ var->data.interpolation = INTERP_MODE_FLAT;
break;
case TGSI_INTERPOLATE_LINEAR:
- var->data.interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
+ var->data.interpolation = INTERP_MODE_NOPERSPECTIVE;
break;
case TGSI_INTERPOLATE_PERSPECTIVE:
- var->data.interpolation = INTERP_QUALIFIER_SMOOTH;
+ var->data.interpolation = INTERP_MODE_SMOOTH;
break;
}
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c
index 8152f8fcb9c..485a4da2c1a 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c
@@ -392,7 +392,7 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
*/
uint32_t inloc = fp->inputs[j].inloc - 8;
- if ((fp->inputs[j].interpolate == INTERP_QUALIFIER_FLAT) ||
+ if ((fp->inputs[j].interpolate == INTERP_MODE_FLAT) ||
(fp->inputs[j].rasterflat && emit->rasterflat)) {
uint32_t loc = inloc;
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.c b/src/gallium/drivers/freedreno/a4xx/fd4_program.c
index 4590c0e7df9..0e8efc2e5c5 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_program.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.c
@@ -520,7 +520,7 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
*/
uint32_t inloc = s[FS].v->inputs[j].inloc - 8;
- if ((s[FS].v->inputs[j].interpolate == INTERP_QUALIFIER_FLAT) ||
+ if ((s[FS].v->inputs[j].interpolate == INTERP_MODE_FLAT) ||
(s[FS].v->inputs[j].rasterflat && emit->rasterflat)) {
uint32_t loc = inloc;
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
index 5c7ad84c250..14d5e50f992 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
@@ -1146,7 +1146,7 @@ static void add_sysval_input(struct ir3_compile *ctx, gl_system_value slot,
so->inputs[n].slot = slot;
so->inputs[n].compmask = 1;
so->inputs[n].regid = r;
- so->inputs[n].interpolate = INTERP_QUALIFIER_FLAT;
+ so->inputs[n].interpolate = INTERP_MODE_FLAT;
so->total_in++;
ctx->ir->ninputs = MAX2(ctx->ir->ninputs, r + 1);
@@ -2055,7 +2055,7 @@ setup_input(struct ir3_compile *ctx, nir_variable *in)
* we need to do flat vs smooth shading depending on
* rast state:
*/
- if (in->data.interpolation == INTERP_QUALIFIER_NONE) {
+ if (in->data.interpolation == INTERP_MODE_NONE) {
switch (slot) {
case VARYING_SLOT_COL0:
case VARYING_SLOT_COL1:
@@ -2069,7 +2069,7 @@ setup_input(struct ir3_compile *ctx, nir_variable *in)
}
if (ctx->flat_bypass) {
- if ((so->inputs[n].interpolate == INTERP_QUALIFIER_FLAT) ||
+ if ((so->inputs[n].interpolate == INTERP_MODE_FLAT) ||
(so->inputs[n].rasterflat && ctx->so->key.rasterflat))
use_ldlv = true;
}
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
index c17a76be189..b773609249f 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
@@ -197,7 +197,7 @@ struct ir3_shader_variant {
/* fragment shader specific: */
bool bary : 1; /* fetched varying (vs one loaded into reg) */
bool rasterflat : 1; /* special handling for emit->rasterflat */
- enum glsl_interp_qualifier interpolate;
+ enum glsl_interp_mode interpolate;
} inputs[16 + 2]; /* +POSITION +FACE */
/* sum of input components (scalar). For frag shaders, it only counts