[Mesa-dev] [PATCH] radeonsi: add support for cull distances.
Marek Olšák
maraeo at gmail.com
Tue Aug 23 17:30:51 UTC 2016
On Tue, Aug 23, 2016 at 4:46 PM, Kai Wasserbäch
<kai at dev.carbon-project.org> wrote:
> Hey Dave,
> Dave Airlie wrote on 23.08.2016 03:28:
>> From: Dave Airlie <airlied at redhat.com>
>>
>> This should be all that is required for cull distances to work
>> on radeonsi.
>
> in case this is indeed enough to enable ARB_cull_distance, mind adding that to
> GL3.txt and the release notes?
Good point.
>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>> ---
>> src/gallium/drivers/radeonsi/si_pipe.c | 3 ++-
>> src/gallium/drivers/radeonsi/si_state.c | 8 ++++----
>> 2 files changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
>> index 62b62db..14b0b80 100644
>> --- a/src/gallium/drivers/radeonsi/si_pipe.c
>> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
>> @@ -436,7 +436,6 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>> case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
>> case PIPE_CAP_VERTEXID_NOBASE:
>> case PIPE_CAP_QUERY_BUFFER_OBJECT:
>> - case PIPE_CAP_CULL_DISTANCE:
>> case PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES:
>> case PIPE_CAP_TGSI_VOTE:
>> case PIPE_CAP_MAX_WINDOW_RECTANGLES:
>> @@ -447,6 +446,8 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>> case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
>> return sscreen->has_draw_indirect_multi;
>>
>> + case PIPE_CAP_CULL_DISTANCE:
>> + return 1;
>> case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>> return 30;
>
> Hm, shouldn't the PIPE_CAP_CULL_DISTANCE just be moved up to the long list of
> supported features with boolean caps at the beginning of si_get_param()?
> (Instead of creating another "true segment"?)
Yes.
Also, like Ilia said, clipdist_mask should be used so as not to break
gl_ClipVertex.
And please keep the empty line between declarations and code.
Thanks,
Marek
More information about the mesa-dev
mailing list