[Bug 29137] [r300g] troubles with wine and "r300: Max size of the constant buffer is 256*4 floats."
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Aug 22 17:49:34 PDT 2010
https://bugs.freedesktop.org/show_bug.cgi?id=29137
--- Comment #15 from Marek Olšák <maraeo at gmail.com> 2010-08-22 17:49:34 PDT ---
I was discussing this with other devs and the conclusion is that this will not
be optimized in Mesa's GLSL compiler because if you use at least one element of
an array, the entire array becomes an "active" uniform and glUniform must then
succeed for all (even unused) elements. Therefore all elements must be
allocated in the constant register file after the compilation.
I am working on elimination of unused constants in the r300 compiler. I am
already finished with vertex shaders, but still, if a shader uses relative
addressing, there is nothing I can do. There is no way to make the shader
compile successfully in this case.
As far as I remember, a D3D9 shader should declare just the constants it uses
and/or ranges of used constants, not the entire constant space available. I
don't remember the exact syntax of D3D9 assembly, but I doubt the HLSL compiler
declares a sequence of definitions similar to this in an asm shader:
def c0
...
def c255
Instead, I think it just contains the definitions of constants the shader
actually needs, and Wine should search for a max index and use that (+1)
instead of 256. If one shader declares the 255th constant, let's make only this
shader declare the array of 256 elements, but there is no need to declare it so
large for every other shader out there.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the dri-devel
mailing list