On 03/12/2011 07:44 PM, Marek Olšák wrote:
The r300 compiler can eliminate unused uniforms and remap uniform locations
if their number surpasses hardware limits, so the limit is actually
NumParameters + NumUnusedParameters. This is important for some apps
under Wine to run.

Wine sometimes declares a uniform array of 256 vec4's and some Wine-specific
constants on top of that, so in total there is more uniforms than r300 can
handle. This was the main motivation for implementing the elimination
of unused constants.

We should allow drivers to implement fail&  recovery paths where it makes
sense, so giving up too early especially when comes to uniforms is not
so good idea, though I agree there should be some hard limit for all drivers.

I added the check_resources() code to fix an issue with the SVGA driver. If we can't do resource checking against the ctx->Const.Vertex/FragmentProgram limits we need something else.

In Gallium we have the PIPE_SHADER_CAP_MAX_x queries. Are you saying we shouldn't check shaders against those limits either?

If we were to push all the shader resource checking down into the Gallium drivers we'll need a new way to propagate error messages back to the user (we can only return NULL from create_X_state() now). Another other problem would be instituting consistant error reporting across all the drivers.

We've kind of tiptoed around this issue in the past. It's probably time to come up with some real solutions.

-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to