summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-01-07 11:21:00 +0100
committerAxel Davy <[email protected]>2015-02-06 00:07:18 +0100
commit6fcc2c887279e6c03b2e7df0f869bd05c99faf28 (patch)
tree40d3e7b6695bbc49e474bac486c70a0ec7adbc3b /src
parent70a523818f08f97b6d51f156dca383cfcab8efab (diff)
st/nine: Print warnings for r500 when shader is likely to go wrong
r500 hasn't enough float constants for vs to fill all needs. Overlapping issues can happen with complex shaders. The fix would be to recompile shaders to include the integer and boolean constants, instead of reserving slots for them. Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/nine/nine_shader.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index b0dd07f820d..eeab27f934f 100644
--- a/src/gallium/state_trackers/nine/nine_shader.c
+++ b/src/gallium/state_trackers/nine/nine_shader.c
@@ -3173,6 +3173,12 @@ nine_translate_shader(struct NineDevice9 *device, struct nine_shader_info *info)
hr = D3D_OK;
}
+ /* r500 */
+ if (info->const_float_slots > device->max_vs_const_f &&
+ (info->const_int_slots || info->const_bool_slots))
+ ERR("Overlapping constant slots. The shader is likely to be buggy\n");
+
+
if (tx->indirect_const_access) /* vs only */
info->const_float_slots = device->max_vs_const_f;