summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-12-01 17:51:33 -0800
committerKenneth Graunke <kenneth@whitecape.org>2015-12-11 13:11:15 -0800
commit7e0c22d461bc5b52cdc90a698e98063d9d6a5f5f (patch)
tree6fe70665fd01b0d91b2b3fa981765ce4531cd7a4 /src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
parent77b338d63b61d72dafa7ecd420e36ee2bb0436ab (diff)
downloadexternal_mesa3d-7e0c22d461bc5b52cdc90a698e98063d9d6a5f5f.zip
external_mesa3d-7e0c22d461bc5b52cdc90a698e98063d9d6a5f5f.tar.gz
external_mesa3d-7e0c22d461bc5b52cdc90a698e98063d9d6a5f5f.tar.bz2
i965: Don't hardcode g1 for URB handles in fs_visitor::emit_urb_writes().
Tessellation evaluation shaders will use g4 instead. For now, make an fs_reg called urb_handle and use that in place of hardcoding g1. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_visitor.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 68f2548..a9a20aa 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -698,6 +698,9 @@ fs_visitor::emit_urb_writes(const fs_reg &gs_vertex_count)
const struct brw_vue_map *vue_map = &vue_prog_data->vue_map;
bool flush;
fs_reg sources[8];
+ fs_reg urb_handle;
+
+ urb_handle = fs_reg(retype(brw_vec8_grf(1, 0), BRW_REGISTER_TYPE_UD));
/* If we don't have any valid slots to write, just do a minimal urb write
* send to terminate the shader. This includes 1 slot of undefined data,
@@ -711,8 +714,7 @@ fs_visitor::emit_urb_writes(const fs_reg &gs_vertex_count)
*/
if (vue_map->slots_valid == 0) {
fs_reg payload = fs_reg(VGRF, alloc.allocate(2), BRW_REGISTER_TYPE_UD);
- bld.exec_all().MOV(payload, fs_reg(retype(brw_vec8_grf(1, 0),
- BRW_REGISTER_TYPE_UD)));
+ bld.exec_all().MOV(payload, urb_handle);
fs_inst *inst = bld.emit(SHADER_OPCODE_URB_WRITE_SIMD8, reg_undef, payload);
inst->eot = true;
@@ -856,8 +858,7 @@ fs_visitor::emit_urb_writes(const fs_reg &gs_vertex_count)
ralloc_array(mem_ctx, fs_reg, length + header_size);
fs_reg payload = fs_reg(VGRF, alloc.allocate(length + header_size),
BRW_REGISTER_TYPE_F);
- payload_sources[0] =
- fs_reg(retype(brw_vec8_grf(1, 0), BRW_REGISTER_TYPE_UD));
+ payload_sources[0] = urb_handle;
if (opcode == SHADER_OPCODE_URB_WRITE_SIMD8_PER_SLOT)
payload_sources[1] = per_slot_offsets;