diff options
author | Jordan Justen <[email protected]> | 2014-11-21 18:47:49 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2015-09-13 09:53:16 -0700 |
commit | c7161a3c3559f0450a90bb1228c74e8fdc9c939b (patch) | |
tree | 58c3c18bce324bf439bef8deef3aba4a97bd3f1a /src/mesa/drivers/dri/i965/brw_fs.cpp | |
parent | 62e011d593008e61ddcba3c32b5710505f4974e6 (diff) |
i965/cs: Reserve local invocation id in payload regs
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 320f612682d..10417c87484 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -42,6 +42,7 @@ #include "brw_eu.h" #include "brw_wm.h" #include "brw_fs.h" +#include "brw_cs.h" #include "brw_cfg.h" #include "brw_dead_control_flow.h" #include "main/uniforms.h" @@ -4731,6 +4732,15 @@ fs_visitor::setup_cs_payload() assert(devinfo->gen >= 7); payload.num_regs = 1; + + if (prog->SystemValuesRead & SYSTEM_BIT_LOCAL_INVOCATION_ID) { + const unsigned local_id_dwords = + brw_cs_prog_local_id_payload_dwords(prog, dispatch_width); + assert((local_id_dwords & 0x7) == 0); + const unsigned local_id_regs = local_id_dwords / 8; + payload.local_invocation_id_reg = payload.num_regs; + payload.num_regs += local_id_regs; + } } void |