nv50/ir: do not call textureMask() for surface ops
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sun, 29 Nov 2015 14:50:09 +0000 (15:50 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 2 Dec 2015 21:10:44 +0000 (22:10 +0100)
That texture mask thing doesn't seem to be needed for surface ops, so
just as nve4+, let do that only for texture ops.

This fixes a segfault with 'test_surface_st' from
gallium/tests/trivial/compute.c on Fermi because this test uses sustp.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp

index 41d2cc9167cdb11b48e76cd1f801f323001ecf6d..16d87e3e762852e8da10e696547f3505758d01cd 100644 (file)
@@ -2084,7 +2084,8 @@ RegAlloc::InsertConstraintsPass::texConstraintNVC0(TexInstruction *tex)
 {
    int n, s;
 
-   textureMask(tex);
+   if (isTextureOp(tex->op))
+      textureMask(tex);
 
    if (tex->op == OP_TXQ) {
       s = tex->srcCount(0xff);