[Mesa-dev] [PATCH 1/2] anv/pipeline: Fix setting per sample shading in pixel shader

Jason Ekstrand jason at jlekstrand.net
Thu Jul 28 19:45:16 UTC 2016


On Jul 28, 2016 2:11 PM, "Anuj Phogat" <anuj.phogat at gmail.com> wrote:
>
>
>
> On Thu, Jul 28, 2016 at 11:58 AM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
>>
>> Please fix gen7 while you're at it. It probably needs the exact same
change.  With that,
>
> ​gen7 needs multisample support before we can test sample shading. I
> talked to Nanley about it and now working on fixing gen7 multisampling.
> I'll add sample shading bits after that.

OK. Sounds good. Go ahead and land it without gen7 if you'd like.

>>
>> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
>>
>>
>> On Jul 28, 2016 1:31 PM, "Anuj Phogat" <anuj.phogat at gmail.com> wrote:
>>>
>>> We should use the persample_dispatch variable in prog_data.
>>>
>>> Fixes all (~60) the DEQP sample shading tests. Many tests exited with
>>> VK_ERROR_OUT_OF_DEVICE_MEMORY without this patch.
>>>
>>> V2: Use the shader key bits set in brw_compile_fs (Jason)
>>>
>>> Cc: Jason Ekstrand <jason at jlekstrand.net>
>>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>>> ---
>>>  src/intel/vulkan/gen8_pipeline.c | 5 +----
>>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>>
>>> diff --git a/src/intel/vulkan/gen8_pipeline.c
b/src/intel/vulkan/gen8_pipeline.c
>>> index cc10d3a..67ffca6 100644
>>> --- a/src/intel/vulkan/gen8_pipeline.c
>>> +++ b/src/intel/vulkan/gen8_pipeline.c
>>> @@ -365,16 +365,13 @@ genX(graphics_pipeline_create)(
>>>              wm_prog_data->dispatch_grf_start_reg_2;
>>>        }
>>>
>>> -      bool per_sample_ps = pCreateInfo->pMultisampleState &&
>>> -
 pCreateInfo->pMultisampleState->sampleShadingEnable;
>>> -
>>>        anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PS_EXTRA), ps) {
>>>           ps.PixelShaderValid              = true;
>>>           ps.PixelShaderKillsPixel         = wm_prog_data->uses_kill;
>>>           ps.PixelShaderComputedDepthMode  =
wm_prog_data->computed_depth_mode;
>>>           ps.AttributeEnable               =
wm_prog_data->num_varying_inputs > 0;
>>>           ps.oMaskPresenttoRenderTarget    = wm_prog_data->uses_omask;
>>> -         ps.PixelShaderIsPerSample        = per_sample_ps;
>>> +         ps.PixelShaderIsPerSample        =
wm_prog_data->persample_dispatch;
>>>           ps.PixelShaderUsesSourceDepth    =
wm_prog_data->uses_src_depth;
>>>           ps.PixelShaderUsesSourceW        = wm_prog_data->uses_src_w;
>>>  #if GEN_GEN >= 9
>>> --
>>> 2.5.5
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160728/4dcf0159/attachment-0001.html>


More information about the mesa-dev mailing list