diff options
author | Rob Clark <[email protected]> | 2017-01-09 16:12:59 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-01-10 19:40:00 -0500 |
commit | b48fde15767284814b3df6e9d7946ca7f5eccbfb (patch) | |
tree | 96dbfaee1166d448faf73e7cb08f4f158a6cbd9d /src/gallium/drivers/freedreno/ir3/ir3_shader.h | |
parent | 730c3047f084f7d3e10b3badd3b0889170d32ff0 (diff) |
freedreno/a5xx: use the non-_ZERO_BASE for vertexid
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3_shader.h')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_shader.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/gallium/drivers/freedreno/ir3/ir3_shader.h index 678a6306aee..052a563b945 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.h @@ -391,4 +391,14 @@ ir3_find_output_regid(const struct ir3_shader_variant *so, unsigned slot) return regid(63, 0); } +static inline uint32_t +ir3_find_sysval_regid(const struct ir3_shader_variant *so, unsigned slot) +{ + int j; + for (j = 0; j < so->inputs_count; j++) + if (so->inputs[j].sysval && (so->inputs[j].slot == slot)) + return so->inputs[j].regid; + return regid(63, 0); +} + #endif /* IR3_SHADER_H_ */ |