summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-09-15 14:41:07 -0400
committerRob Clark <[email protected]>2018-10-17 12:44:48 -0400
commit835cb069656a75c15ed4d707fd39d20dc370ee96 (patch)
tree17cfdd9be16a73f2cbe64ff09a1879fd293c761f /src/gallium/drivers/freedreno/ir3
parentcbf9fe50b5f848c6be380ab37cf034618c9a851e (diff)
freedreno/ir3: fix broken texcoord inputs
TODO not sure if this is best solution, but current logic is broken for texcoord inputs. It is definitely the simplest solution. Fixes: 1a24f519663 freedreno/ir3: ignore unused inputs Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
index 8f749f4110e..2d99bc74a92 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
@@ -3247,25 +3247,6 @@ create_frag_coord(struct ir3_context *ctx, unsigned comp)
}
}
-static uint64_t
-input_bitmask(struct ir3_context *ctx, nir_variable *in)
-{
- unsigned ncomp = glsl_get_components(in->type);
- unsigned slot = in->data.location;
-
- /* let's pretend things other than vec4 don't exist: */
- ncomp = MAX2(ncomp, 4);
-
- if (ctx->so->type == SHADER_FRAGMENT) {
- /* see st_nir_fixup_varying_slots(): */
- if (slot >= VARYING_SLOT_VAR9)
- slot -= 9;
- }
-
- /* Note that info.inputs_read is in units of vec4 slots: */
- return ((1ull << (ncomp/4)) - 1) << slot;
-}
-
static void
setup_input(struct ir3_context *ctx, nir_variable *in)
{
@@ -3284,9 +3265,8 @@ setup_input(struct ir3_context *ctx, nir_variable *in)
/* skip unread inputs, we could end up with (for example), unsplit
* matrix/etc inputs in the case they are not read, so just silently
* skip these.
- *
*/
- if (!(ctx->s->info.inputs_read & input_bitmask(ctx, in)))
+ if (ncomp > 4)
return;
compile_assert(ctx, ncomp == 4);