draw: fix PIPE_MAX_SAMPLER/PIPE_MAX_SHADER_SAMPLER_VIEWS issues
authorRoland Scheidegger <sroland@vmware.com>
Fri, 30 Aug 2013 15:24:59 +0000 (17:24 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 30 Aug 2013 21:20:04 +0000 (23:20 +0200)
commit431e60625b1dcacc126087f36adedb89fa60bfaa
tree23a57c583d593a02080e52a67384753f8fca30e4
parentf37edb5e20bddf082c25e812ee6f144c4306b8e2
draw: fix PIPE_MAX_SAMPLER/PIPE_MAX_SHADER_SAMPLER_VIEWS issues

pstipple/aaline stages used PIPE_MAX_SAMPLER instead of
PIPE_MAX_SHADER_SAMPLER_VIEWS when dealing with sampler views.
Now these stages can't actually handle sampler_unit != texture_unit anyway
(they cannot work with d3d10 shaders at all due to using tex not sample
opcodes as "mixed mode" shaders are impossible) but this leads to crashes if
a driver just installs these stages and then more than PIPE_MAX_SAMPLER views
are set even if the stages aren't even used.

Reviewed-by: Zack Rusin <zackr@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_aaline.c
src/gallium/auxiliary/draw/draw_pipe_pstipple.c