freedreno/ir3: Don't assume binning shader is always VS
authorKristian H. Kristensen <hoegsberg@google.com>
Wed, 23 Oct 2019 03:21:13 +0000 (20:21 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Fri, 8 Nov 2019 00:40:27 +0000 (16:40 -0800)
In tessellation mode, the TES is (probably) the binning shader.

Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/freedreno/ir3/ir3_compiler_nir.c

index f58f1a04b558dbaf2ad947ec26cbe0010aad2aed..66b274d1787a5c5d40d88ccd5d805071e5b41236 100644 (file)
@@ -3332,8 +3332,8 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler,
         * need to make sure not to remove any inputs that are used by
         * the nonbinning VS.
         */
-       if (ctx->compiler->gpu_id >= 600 && so->binning_pass) {
-               debug_assert(so->type == MESA_SHADER_VERTEX);
+       if (ctx->compiler->gpu_id >= 600 && so->binning_pass &&
+                       so->type == MESA_SHADER_VERTEX) {
                for (int i = 0; i < ir->ninputs; i++) {
                        struct ir3_instruction *in = ir->inputs[i];