[Mesa-stable] [PATCH 2/2] i965/fs: Set force_uncompressed and force_sechalf on samplepos setup.
Anuj Phogat
anuj.phogat at gmail.com
Wed Jul 16 18:10:44 PDT 2014
On Thu, Jul 10, 2014 at 8:51 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> gen8_fs_generator uses these to decide whether to set the execution size
> to 8 or 16, so we incorrectly made both of these MOVs the full width in
> SIMD16 shaders. (It happened to work out on Gen4-7.)
>
> Setting them should also help inform optimization passes what's really
> going on, which could help avoid bugs.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/mesa/drivers/dri/i965/brw_fs.cpp | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index a3ad375..ceea32a 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -1248,19 +1248,21 @@ fs_visitor::emit_samplepos_setup(ir_variable *ir)
> stride(retype(brw_vec1_grf(payload.sample_pos_reg, 0),
> BRW_REGISTER_TYPE_B), 16, 8, 2);
>
> - emit(MOV(int_sample_x, fs_reg(sample_pos_reg)));
> + fs_inst *inst = emit(MOV(int_sample_x, fs_reg(sample_pos_reg)));
> if (dispatch_width == 16) {
> - fs_inst *inst = emit(MOV(half(int_sample_x, 1),
> - fs_reg(suboffset(sample_pos_reg, 16))));
> + inst->force_uncompressed = true;
> + inst = emit(MOV(half(int_sample_x, 1),
> + fs_reg(suboffset(sample_pos_reg, 16))));
> inst->force_sechalf = true;
> }
> /* Compute gl_SamplePosition.x */
> compute_sample_position(pos, int_sample_x);
> pos.reg_offset++;
> - emit(MOV(int_sample_y, fs_reg(suboffset(sample_pos_reg, 1))));
> + inst = emit(MOV(int_sample_y, fs_reg(suboffset(sample_pos_reg, 1))));
> if (dispatch_width == 16) {
> - fs_inst *inst = emit(MOV(half(int_sample_y, 1),
> - fs_reg(suboffset(sample_pos_reg, 17))));
> + inst->force_uncompressed = true;
> + inst = emit(MOV(half(int_sample_y, 1),
> + fs_reg(suboffset(sample_pos_reg, 17))));
> inst->force_sechalf = true;
> }
> /* Compute gl_SamplePosition.y */
> --
> 2.0.0
>
> _______________________________________________
> mesa-stable mailing list
> mesa-stable at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-stable
Both patches are:
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
More information about the mesa-stable
mailing list