[Mesa-dev] [PATCH 2/2] i965: Implement ARB_texture_filter_minmax
Scott D Phillips
scott.d.phillips at intel.com
Mon Nov 20 23:17:25 UTC 2017
Ian Romanick <idr at freedesktop.org> writes:
> On 11/19/2017 01:31 AM, Kenneth Graunke wrote:
>> On Thursday, November 16, 2017 11:50:48 AM PST Ian Romanick wrote:
>>> On 11/14/2017 02:54 PM, Scott D Phillips wrote:
>>>> On gen >= 9, minmax reduction modes are available as a flag in
>>>> SAMPLER_STATE.
>>>> ---
>>>> docs/features.txt | 2 +-
>>>> src/mesa/drivers/dri/i965/brw_formatquery.c | 4 ++++
>>>> src/mesa/drivers/dri/i965/genX_state_upload.c | 10 ++++++++++
>>>> src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
>>>> 4 files changed, 16 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/docs/features.txt b/docs/features.txt
>>>> index 86d07ba80b..9ec3f2b975 100644
>>>> --- a/docs/features.txt
>>>> +++ b/docs/features.txt
>>>> @@ -312,7 +312,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
>>>> GL_ARB_sparse_texture not started
>>>> GL_ARB_sparse_texture2 not started
>>>> GL_ARB_sparse_texture_clamp not started
>>>> - GL_ARB_texture_filter_minmax not started
>>>> + GL_ARB_texture_filter_minmax DONE (i965)
>>>> GL_EXT_memory_object DONE (radeonsi)
>>>> GL_EXT_memory_object_fd DONE (radeonsi)
>>>> GL_EXT_memory_object_win32 not started
>>>> diff --git a/src/mesa/drivers/dri/i965/brw_formatquery.c b/src/mesa/drivers/dri/i965/brw_formatquery.c
>>>> index 4f3b9e467b..bb2281f571 100644
>>>> --- a/src/mesa/drivers/dri/i965/brw_formatquery.c
>>>> +++ b/src/mesa/drivers/dri/i965/brw_formatquery.c
>>>> @@ -107,6 +107,10 @@ brw_query_internal_format(struct gl_context *ctx, GLenum target,
>>>> break;
>>>> }
>>>>
>>>> + case GL_TEXTURE_REDUCTION_MODE_ARB:
>>>> + params[0] = GL_TRUE;
>>>> + break;
>>>> +
>>>
>>> Can Gen9 actually support all formats? When this was getting discussed
>>> in Khronos, I thought we had some format restrictions. This is the
>>> difference between the EXT and the ARB extension. If we don't actually
>>> have any restrictions on Gen9, a good follow-on would be to add support
>>> for the EXT... since that doesn't have the OpenGL 3.3 requirement and
>>> has interactions with OpenGL ES.
>>>
>>> I also thought that Gen8 could do some min/max modes. Perhaps that's
>>> where the restrictions were that I was thinking of...
>>
>> Skylake has the SAMPLER_STATE reduction mode field.
>>
>> Previous generations had sampler_min/max messages that work differently.
>>
>> If I recall, we discussed this previously and concluded the old messages
>> weren't that useful...or at least, would result in more NOS and awkward
>> restrictions.
>
> That's probably what I was thinking of.
>
> So... we think it should "just work" for all formats on SKL? It sounds
> like various test suites only exercise a very small set of
> single-channel formats. I think we should add piglit tests to poke at
> least some other formats. I talked to Scott about this last week, and
> he seemed amenable to the idea.
I'm working on making the piglit tests we talked about, so that should
help figure this out. FWIW, I wasn't able to find any restrictions
listed in the PRM.
More information about the mesa-dev
mailing list