On 08/28/2016 06:17 PM, Ilia Mirkin wrote: > On Sun, Aug 28, 2016 at 9:05 PM, Ian Romanick <i...@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
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev