[Mesa-dev] [PATCH V2 2/2] i965: Change 8X MSAA sample mapping
Anuj Phogat
anuj.phogat at gmail.com
Fri Aug 12 00:34:25 UTC 2016
Thanks for the review. Can you also review the piglit patch?
"multisample_blit_scaled: Change 8X MSAA sample mapping"
On Thu, Aug 11, 2016 at 3:56 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> This looks good. Thanks! I think we should probably squash it in to the
> other one because there's technically a regression between the two. Both
> are
>
> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
>
> On Thu, Aug 11, 2016 at 12:28 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>>
>> This is required following the change in 8X sample positions.
>> Fixes the recently modified multisample-scaled-blit piglit tests.
>>
>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>> ---
>> src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 10 +++++-----
>> src/mesa/drivers/dri/i965/gen6_multisample_state.c | 2 +-
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
>> b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
>> index b903de1..f7f685b 100644
>> --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
>> @@ -1094,13 +1094,13 @@ blorp_nir_manual_blend_bilinear(nir_builder *b,
>> nir_ssa_def *pos,
>> *
>> * In case of 8x MSAA the two layouts don't match.
>> * sample index layout : --------- sample number layout :
>> ---------
>> - * | 0 | 1 | | 5
>> | 2 |
>> + * | 0 | 1 | | 3
>> | 7 |
>> * ---------
>> ---------
>> - * | 2 | 3 | | 4
>> | 6 |
>> + * | 2 | 3 | | 5
>> | 0 |
>> * ---------
>> ---------
>> - * | 4 | 5 | | 0
>> | 3 |
>> + * | 4 | 5 | | 1
>> | 2 |
>> * ---------
>> ---------
>> - * | 6 | 7 | | 7
>> | 1 |
>> + * | 6 | 7 | | 4
>> | 6 |
>> * ---------
>> ---------
>> *
>> * Fortunately, this can be done fairly easily as:
>> @@ -1128,7 +1128,7 @@ blorp_nir_manual_blend_bilinear(nir_builder *b,
>> nir_ssa_def *pos,
>> sample = nir_f2i(b, sample);
>>
>> if (tex_samples == 8) {
>> - sample = nir_iand(b, nir_ishr(b, nir_imm_int(b, 0x17306425),
>> + sample = nir_iand(b, nir_ishr(b, nir_imm_int(b, 0x64210573),
>> nir_ishl(b, sample, nir_imm_int(b,
>> 2))),
>> nir_imm_int(b, 0xf));
>> } else if (tex_samples == 16) {
>> diff --git a/src/mesa/drivers/dri/i965/gen6_multisample_state.c
>> b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
>> index a47e323..a59ffec 100644
>> --- a/src/mesa/drivers/dri/i965/gen6_multisample_state.c
>> +++ b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
>> @@ -109,7 +109,7 @@ gen6_set_sample_maps(struct gl_context *ctx)
>> {
>> uint8_t map_2x[2] = {0, 1};
>> uint8_t map_4x[4] = {0, 1, 2, 3};
>> - uint8_t map_8x[8] = {5, 2, 4, 6, 0, 3, 7, 1};
>> + uint8_t map_8x[8] = {3, 7, 5, 0, 1, 2, 4, 6};
>> uint8_t map_16x[16] = { 15, 10, 9, 7, 4, 1, 3, 13,
>> 12, 2, 0, 6, 11, 8, 5, 14 };
>>
>> --
>> 2.5.5
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
More information about the mesa-dev
mailing list