[Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

Erik Faye-Lund erik.faye-lund at collabora.com
Tue Nov 20 09:57:06 UTC 2018


On Tue, 2018-11-20 at 10:08 +0100, Erik Faye-Lund wrote:
> On Tue, 2018-11-20 at 01:21 -0500, Marek Olšák wrote:
> > I'd like to keep ARB_texture_float enabled on drivers that don't
> > support linear interpolation. ARB_texture_float is required by DX9,
> > which doesn't require linear interpolation.
> 
> This logic sounds circular. Since ARB_texture_float *does* require
> linear interpolation, are you sure DX9 requires ARB_texture_float?
> How
> would DirectX even require a GL extension?
> 
> Are you talking about Gallium Nine or something like that? If so, it
> should probably require some combination of OES_texture_half_float
> and
> OES_texture_float instead, no?
> 
> FWIW, I can't find any refreences to ARB_texture_float in Gallium
> Nine...
> 
> What exactly are you talking about?
> 

OK, I think perhaps I've figured it out; you're probably referring to
Wine's emulation. And the problem is that OES_texture_half_float /
OES_texture_float are only available (outside of mesa) from OpenGL ES.
A state-tracker has enough information, but not an application.

It looks a bit to me like there's simply no OpenGL extension that
matches the DX9 behavior. I find this surprising, because ATI had a
bunch of floating-point texturing demos for Radeon 9600 etc. Even
ATI_texture_float doesn't seem to diallow filtering either...

This also brings up another problem. We expose ATI_texture_float if
ARB_texture_float is supported. But this seems like a bad choice;
ATI_texture_float defines a *different* 16-bit floating point format
than ARB_texture_float. From the ATI_texture_float spec:

"There are no NAN or infinity values for 16 bit floating-point."

However, the ARB_texture_float-extension defines both NAN and infinity
values...

Especially NAN-propagation has been problematic with cross-API
emulation in the past.

Since the ATI_texture_float and ARB_texture_float enums have the same
values, I doubt there's little to do here apart from either accepting
this problem, or stop advertising ATI_texture_float (which probably
leads to problems with old applications that doesn't care about NAN /
infinity)...

But perhaps we should at least document problems like these somewhere?



More information about the mesa-dev mailing list