[Mesa-dev] [PATCH 04/10] i965/fs: Set instruction widths in a variety of places
Jason Ekstrand
jason at jlekstrand.net
Thu Sep 4 22:19:08 PDT 2014
Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ++++++
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 5 ++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index c39a062..cbd3a77 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -342,6 +342,7 @@ fs_visitor::DEP_RESOLVE_MOV(int grf)
/* The caller always wants uncompressed to emit the minimal extra
* dependencies, and to avoid having to deal with aligning its regs to 2.
*/
+ inst->width = 8;
inst->force_uncompressed = true;
return inst;
@@ -557,6 +558,7 @@ fs_visitor::get_timestamp()
*/
mov->force_writemask_all = true;
mov->force_uncompressed = true;
+ mov->width = 8;
/* The caller wants the low 32 bits of the timestamp. Since it's running
* at the GPU clock rate of ~1.2ghz, it will roll over every ~3 seconds,
@@ -1289,9 +1291,11 @@ fs_visitor::emit_samplepos_setup()
fs_inst *inst = emit(MOV(int_sample_x, fs_reg(sample_pos_reg)));
if (dispatch_width == 16) {
+ inst->width = 8;
inst->force_uncompressed = true;
inst = emit(MOV(half(int_sample_x, 1),
fs_reg(suboffset(sample_pos_reg, 16))));
+ inst->width = 8;
inst->force_sechalf = true;
}
/* Compute gl_SamplePosition.x */
@@ -1299,9 +1303,11 @@ fs_visitor::emit_samplepos_setup()
pos.reg_offset++;
inst = emit(MOV(int_sample_y, fs_reg(suboffset(sample_pos_reg, 1))));
if (dispatch_width == 16) {
+ inst->width = 8;
inst->force_uncompressed = true;
inst = emit(MOV(half(int_sample_y, 1),
fs_reg(suboffset(sample_pos_reg, 17))));
+ inst->width = 8;
inst->force_sechalf = true;
}
/* Compute gl_SamplePosition.y */
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 61b026b..ad89914 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -2965,11 +2965,13 @@ fs_visitor::emit_color_write(int target, int index, int first_color_mrf)
push_force_uncompressed();
inst = emit(MOV(fs_reg(MRF, first_color_mrf + index, color.type),
color));
+ inst->width = 8;
inst->saturate = key->clamp_fragment_color;
pop_force_uncompressed();
inst = emit(MOV(fs_reg(MRF, first_color_mrf + index + 4, color.type),
half(color, 1)));
+ inst->width = 8;
inst->force_sechalf = true;
inst->saturate = key->clamp_fragment_color;
}
@@ -3073,7 +3075,8 @@ fs_visitor::emit_fb_writes()
if (payload.aa_dest_stencil_reg) {
push_force_uncompressed();
emit(MOV(fs_reg(MRF, nr++),
- fs_reg(brw_vec8_grf(payload.aa_dest_stencil_reg, 0))));
+ fs_reg(brw_vec8_grf(payload.aa_dest_stencil_reg, 0))))
+ ->width = 8;
pop_force_uncompressed();
}
--
2.1.0
More information about the mesa-dev
mailing list