summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index ef3d2b0be58..656f48860fd 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -248,14 +248,15 @@ NineDevice9_ctor( struct NineDevice9 *This,
struct pipe_resource tmpl;
unsigned max_const_vs, max_const_ps;
+ /* vs 3.0: >= 256 float constants, but for cards with exactly 256 slots,
+ * we have to take in some more slots for int and bool*/
max_const_vs = _min(pScreen->get_shader_param(pScreen, PIPE_SHADER_VERTEX,
PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE) /
sizeof(float[4]),
- NINE_MAX_CONST_ALL);
- max_const_ps = _min(pScreen->get_shader_param(pScreen, PIPE_SHADER_FRAGMENT,
- PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE) /
- sizeof(float[4]),
NINE_MAX_CONST_ALL);
+ /* ps 3.0: 224 float constants. All cards supported support at least
+ * 256 constants for ps */
+ max_const_ps = 224 + (NINE_MAX_CONST_I + NINE_MAX_CONST_B / 4);
This->max_vs_const_f = max_const_vs -
(NINE_MAX_CONST_I + NINE_MAX_CONST_B / 4);