diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-04-20 23:39:29 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-04-24 02:22:31 +0000 |
commit | 1f7b3884c9ba3f176e096c8aa4dff19fad0453cb (patch) | |
tree | 22e947f6d15a43d93e1de995dc0207f0c38715c8 /src/gallium/drivers/panfrost | |
parent | 042d0bb5c3b457e92f8de2427ee258778b51aef4 (diff) |
panfrost/midgard: Pipe through varying arrays
Varying arrays sometimes are lowered to a series of directly accessed
varyings (which we handled okay), but when indirectly accessed, they
appear as a single array; we need to handle this as well.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r-- | src/gallium/drivers/panfrost/midgard/midgard_compile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c index 67c1d59d85a..ce758f5555b 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c @@ -3417,7 +3417,11 @@ midgard_compile_shader_nir(nir_shader *nir, midgard_program *program, bool is_bl nir_foreach_variable(var, varyings) { unsigned loc = var->data.driver_location; - program->varyings[loc] = var->data.location; + unsigned sz = glsl_type_size(var->type, FALSE); + + for (int c = 0; c < sz; ++c) { + program->varyings[loc + c] = var->data.location; + } } /* Lower gl_Position pre-optimisation */ |