diff options
author | Roland Scheidegger <[email protected]> | 2010-02-04 19:23:09 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-02-04 19:23:09 +0100 |
commit | 2c326e72664e65166c68b027b26aaf373f3be36d (patch) | |
tree | 936c473da596c90f7a649f25da93dc7a07d7157b /src/mesa/shader/prog_statevars.h | |
parent | 8091e73cc2142945c297191a9b746be71360ef26 (diff) |
gallium: add point size clamp to implementation limits in vertex shader
The point size min/max registers (unused by mesa state tracker) were removed
since most hardware couldn't do much with them. However, we don't want to have
to rely on hw to do point size clamping correctly to implementation
dependent limits, hence have to do that in the vertex shader. This should also
solve a potential problem with (non-AA) points smaller than 1.0 which according
to OGL still have size 1.0.
Note that OGL point rendering is odd, in particular point sprites are rasterized
differently to points. Some hardware might support those different modes, but in
any case the different clamping values used for smooth/multisampled/sprite
enabled points might help a bit for hw which rasterizes points the same as point
sprites.
Also tweak mesa's ff to vertex shader translation so don't have to clamp twice in
case of point attenuation.
Diffstat (limited to 'src/mesa/shader/prog_statevars.h')
-rw-r--r-- | src/mesa/shader/prog_statevars.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 1180d9eaa4a..1753471ffb6 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -108,6 +108,8 @@ typedef enum gl_state_index_ { STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, STATE_FOG_PARAMS_OPTIMIZED, /* for faster fog calc */ + STATE_POINT_SIZE_CLAMPED, /* includes implementation dependent size clamp */ + STATE_POINT_SIZE_IMPL_CLAMP, /* for implementation clamp only in vs */ STATE_LIGHT_SPOT_DIR_NORMALIZED, /* pre-normalized spot dir */ STATE_LIGHT_POSITION, /* object vs eye space */ STATE_LIGHT_POSITION_NORMALIZED, /* object vs eye space */ |