summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-06-19 17:49:47 -0400
committerJonathan Marek <[email protected]>2019-07-14 10:34:17 -0400
commit4e102a6de72667c1177e7c484d72bf1d94d028ca (patch)
treeb729d675dcb5d1c086c1d114e9e6e6174530b3e8
parenta9e78a44d1edc39df99bbf71e5e1d8d762438ceb (diff)
etnaviv: fix incorrect varying interpolation
This corresponds to what the GC3000 blob does. The USED / UNUSED enums are wrong, at least for GC2000/GC3000. Without this the 3rd texture component is not interpolated correctly (flat?) in the following test (and others): dEQP-GLES2.functional.texture.mipmap.cube.generate.rgba8888_nicest Strangely, when the texture is sampled from OpenGL it works correctly, the problem only shows up for sampling by gallium/blitter. This fixes other cube map tests which use util_blitter_blit. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_compiler.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.c b/src/gallium/drivers/etnaviv/etnaviv_compiler.c
index ceca5b8af99..90eda5b5d60 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_compiler.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_compiler.c
@@ -2575,16 +2575,18 @@ etna_link_shader(struct etna_shader_link_info *info,
else /* texture coord or other bypasses flat shading */
varying->pa_attributes = 0x2f1;
- varying->use[0] = interpolate_always ? VARYING_COMPONENT_USE_POINTCOORD_X : VARYING_COMPONENT_USE_USED;
- varying->use[1] = interpolate_always ? VARYING_COMPONENT_USE_POINTCOORD_Y : VARYING_COMPONENT_USE_USED;
- varying->use[2] = VARYING_COMPONENT_USE_USED;
- varying->use[3] = VARYING_COMPONENT_USE_USED;
-
+ varying->use[0] = VARYING_COMPONENT_USE_UNUSED;
+ varying->use[1] = VARYING_COMPONENT_USE_UNUSED;
+ varying->use[2] = VARYING_COMPONENT_USE_UNUSED;
+ varying->use[3] = VARYING_COMPONENT_USE_UNUSED;
/* point coord is an input to the PS without matching VS output,
* so it gets a varying slot without being assigned a VS register.
*/
if (fsio->semantic.Name == TGSI_SEMANTIC_PCOORD) {
+ varying->use[0] = VARYING_COMPONENT_USE_POINTCOORD_X;
+ varying->use[1] = VARYING_COMPONENT_USE_POINTCOORD_Y;
+
info->pcoord_varying_comp_ofs = comp_ofs;
} else {
if (vsio == NULL) { /* not found -- link error */