[Mesa-dev] [PATCH 1/2] mesa: Implement ARB_texture_filter_minmax

Ilia Mirkin imirkin at alum.mit.edu
Thu Nov 16 20:11:17 UTC 2017


On Thu, Nov 16, 2017 at 2:57 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Thu, Nov 16, 2017 at 2:49 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> On 11/14/2017 02:54 PM, Scott D Phillips wrote:
>>> This extension provides a new texture and sampler parameter
>>> (TEXTURE_REDUCTION_MODE_ARB) which allows applications to produce
>>> a filtered texel value by computing a component-wise minimum (MIN)
>>> or maximum (MAX) of the texels that would normally be averaged.
>>> ---
>>> CTS tests KHR-GL45.texture_filter_minmax_tests.* need a little TLC to
>>> pass with this series. Details in VK-GL-CTS issue: 849
>>>
>>>  src/mesa/main/attrib.c           |  4 ++++
>>>  src/mesa/main/extensions_table.h |  1 +
>>>  src/mesa/main/formatquery.c      | 10 ++++++++++
>>>  src/mesa/main/mtypes.h           |  2 ++
>>>  src/mesa/main/samplerobj.c       | 37 +++++++++++++++++++++++++++++++++++++
>>>  src/mesa/main/texobj.c           |  2 ++
>>>  src/mesa/main/texobj.h           |  2 +-
>>>  src/mesa/main/texparam.c         | 33 +++++++++++++++++++++++++++++++++
>>>  8 files changed, 90 insertions(+), 1 deletion(-)
>>>
>>
>> [lots of stuff trimmed]
>>
>>> diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
>>> index 5b66e7d30d..c51ad80742 100644
>>> --- a/src/mesa/main/extensions_table.h
>>> +++ b/src/mesa/main/extensions_table.h
>>> @@ -146,6 +146,7 @@ EXT(ARB_texture_env_combine                 , ARB_texture_env_combine
>>>  EXT(ARB_texture_env_crossbar                , ARB_texture_env_crossbar               , GLL,  x ,  x ,  x , 2001)
>>>  EXT(ARB_texture_env_dot3                    , ARB_texture_env_dot3                   , GLL,  x ,  x ,  x , 2001)
>>>  EXT(ARB_texture_filter_anisotropic          , ARB_texture_filter_anisotropic         , GLL, GLC,  x ,  x , 2017)
>>> +EXT(ARB_texture_filter_minmax               , ARB_texture_filter_minmax              , GLL, GLC,  x ,  x , 2017)
>>
>> Is this right?  The extension says OpenGL 3.3 is required, and we don't
>> (until Marek is done) do OpenGL 3.3 compatibility profile.
>
> FWIW I took the view that spec writers are lazy on
> EXT_polygon_offset_clamp, which had similar text. Is this a bad thing
> to do? Should we stick to the text of the specs to the letter?
>
> There are various GL 4.2/4.3 exts which require the previous GL
> version as well but we expose them anyways.
>
> IMHO it's reasonable to be relaxed about this, unless there are
> obvious interactions that need explicit consideration. [Perhaps that's
> the case here, although I can't think of anything.]

Oh, it depends on ARB_sampler_objects, and that functionality was core
in GL 3.3 - probably that's why the spec listed it that way.

  -ilia


More information about the mesa-dev mailing list