[Mesa-stable] [Mesa-dev] [PATCH] i965: set size of txf_mcs payload vgrf properly

Chris Forbes chrisf at ijw.co.nz
Fri Jan 3 23:22:26 PST 2014


This doesn't need to go in 10.0 -- CMS layout for multisample textures
is only in master.

On Sat, Jan 4, 2014 at 5:28 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 01/03/2014 06:44 PM, Chris Forbes wrote:
>> Previously we left the size of this vgrf as 1, which caused register
>> allocation to be subtly broken. If we were lucky we would explode in
>> the post-alloc instruction scheduler; if we were unlucky we'd just stomp
>> on someone else and get broken rendering.
>>
>> Fixes crash when running `tesseract` with the following settings:
>>
>>    msaa 4
>>    glineardepth 0
>>
>> Also fixes the piglit test:
>>
>>   arb_sample_shading-builtin-gl-sample-id
>>
>> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>> Cc: Anuj Phogat <anuj.phogat at gmail.com>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72859
>> ---
>>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
>> index 8e516a5..53cd0a1 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
>> @@ -1549,6 +1549,7 @@ fs_visitor::emit_mcs_fetch(ir_texture *ir, fs_reg coordinate, int sampler)
>>     }
>>
>>     fs_inst *inst = emit(SHADER_OPCODE_TXF_MCS, dest, payload);
>> +   virtual_grf_sizes[payload.reg] = next.reg_offset;
>>     inst->base_mrf = -1;
>>     inst->mlen = next.reg_offset * reg_width;
>>     inst->header_present = false;
>>
>
> Whoops.  Easy to do, seeing as this wasn't necessary with the MRF-based
> model...
>
> Cc: "10.0" <mesa-stable at lists.freedesktop.org>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-stable mailing list