[Mesa-dev] [PATCH 05/13] nouveau: Enable EXT_texture_env_dot3 on NV10 and NV20

Ian Romanick idr at freedesktop.org
Fri Sep 9 01:00:00 UTC 2016


On 08/28/2016 06:17 PM, Ilia Mirkin wrote:
> On Sun, Aug 28, 2016 at 9:05 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> On 08/28/2016 08:56 AM, Ilia Mirkin wrote:
>>> FWIW this fails for GL_DOT3_RGBA_EXT but works for GL_DOT3_RGB_EXT
>>> [according to glean's texCombine test]. (I suspect the existing
>>
>> Looking at the test results... any idea what it's actually doing?
>> Ignoring alpha and using 1.0?  Using garbage?  Other?
> 
> Wellll... it's unclear that the results can be trusted. There's an
> error in setting the RC_OUT_ALPHA value which means that the hardware
> is in some pseudo-inconsistent state, potentially. (The error is
> thrown when the graph engine processes the register write request from
> the command FIFO, in the form of an interrupt.) For a while I was
> getting 0,0,0,0.25, and then I started getting 1,1,1,0.25. The "real"
> answer was supposed to be 1,1,1,1:
> 
> $ NOUVEAU_VIEUX=1 bin/glean -o -v -v -v -t +texCombine  --quick
> texCombine:  FAIL rgba8, db, z24, s8, win+pmap, id 33
>         expected 1, 1, 1, 1, got 0, 0, 0, 0.247059 in Single Texture Test
>         Current combine state:
>         Incoming Fragment RGBA = 0, 0.25, 0.5, 0.75
>         Texture Unit 0:
>           GL_COMBINE_RGB_EXT = GL_DOT3_RGBA_EXT
>           GL_COMBINE_ALPHA_EXT = GL_MODULATE
>           GL_SOURCE0_RGB_EXT = GL_TEXTURE
>           GL_SOURCE1_RGB_EXT = GL_TEXTURE
>           GL_SOURCE2_RGB_EXT = GL_CONSTANT_EXT
>           GL_SOURCE0_ALPHA_EXT = GL_TEXTURE
>           GL_SOURCE1_ALPHA_EXT = GL_TEXTURE
>           GL_SOURCE2_ALPHA_EXT = GL_CONSTANT_EXT
>           GL_OPERAND0_RGB_EXT = GL_SRC_COLOR
>           GL_OPERAND1_RGB_EXT = GL_SRC_COLOR
>           GL_OPERAND2_RGB_EXT = GL_SRC_ALPHA
>           GL_OPERAND0_ALPHA_EXT = GL_SRC_ALPHA
>           GL_OPERAND1_ALPHA_EXT = GL_SRC_ALPHA
>           GL_OPERAND2_ALPHA_EXT = GL_SRC_ALPHA
>           GL_RGB_SCALE_EXT = 1
>           GL_ALPHA_SCALE = 1
>           Tex Env RGBA = 0.25, 0.5, 0.75, 1
>           Texture RGBA = 1, 0, 0.25, 0.5
> 
> To be super-clear - this is not your fault - it was already like that
> for the non-EXT version. But I'm hoping you could provide some hints
> as to why it's happening and/or how I could fix it.
> 
> And I'm pretty sure the RGB_EXT thing works, because the texcombine
> test runs that first and there are no errors from it.

While I was waiting for my GF3 system to finish installing... I dug
through the GL_NV_register_combiners documentation.  That extension is a
pretty thin shim on top of what the hardware does.  As far as I can
tell, there is no way to output the same data to RGB and A in a single
combiner stage.  I believe you have to use a second register combiner
stage to copy the blue component from the DOT3 operation to the alpha
component.

I'm not sure how to accomplish that in the current architecture.

>   -ilia


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160908/75ead629/attachment.sig>


More information about the mesa-dev mailing list