Mesa (master): gm107/ir: disable TEXS for tex with derivAll set

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 18 02:29:08 UTC 2019


Module: Mesa
Branch: master
Commit: 80dae7022eea660eb85f9f0cd094cfa5c7102e9d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=80dae7022eea660eb85f9f0cd094cfa5c7102e9d

Author: Karol Herbst <kherbst at redhat.com>
Date:   Fri Jan 18 02:43:54 2019 +0100

gm107/ir: disable TEXS for tex with derivAll set

fixes deqp tests:
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.samplercube_fixed_vertex
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.samplercube_float_vertex
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.isamplercube_vertex
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.usamplercube_vertex
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler3d_fixed_vertex
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler3d_float_vertex
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.isampler3d_vertex
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.usampler3d_vertex
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2dshadow_vertex
dEQP-GLES3.functional.shaders.texture_functions.textureprojgrad.sampler3d_fixed_vertex
dEQP-GLES3.functional.shaders.texture_functions.textureprojgrad.sampler3d_float_vertex
dEQP-GLES3.functional.shaders.texture_functions.textureprojgrad.isampler3d_vertex
dEQP-GLES3.functional.shaders.texture_functions.textureprojgrad.usampler3d_vertex
dEQP-GLES3.functional.shaders.texture_functions.textureprojgrad.sampler2dshadow_vertex

Fixes: f821e80213e38e93f96255b3deacb737a600ed40
       "gm107/ir: use scalar tex instructions where possible"
Signed-off-by: Karol Herbst <kherbst at redhat.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 1 +
 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp         | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
index be00db3131..6eefe8f002 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
@@ -2863,6 +2863,7 @@ void
 CodeEmitterGM107::emitTEXS()
 {
    const TexInstruction *insn = this->insn->asTex();
+   assert(!insn->tex.derivAll);
 
    switch (insn->op) {
    case OP_TEX:
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index 322b79fe62..f4379c137c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -2142,7 +2142,8 @@ bool
 RegAlloc::InsertConstraintsPass::isScalarTexGM107(TexInstruction *tex)
 {
    if (tex->tex.sIndirectSrc >= 0 ||
-       tex->tex.rIndirectSrc >= 0)
+       tex->tex.rIndirectSrc >= 0 ||
+       tex->tex.derivAll)
       return false;
 
    if (tex->tex.mask == 5 || tex->tex.mask == 6)




More information about the mesa-commit mailing list