From: Axel Davy Date: Wed, 7 Jan 2015 10:21:00 +0000 (+0100) Subject: st/nine: Print warnings for r500 when shader is likely to go wrong X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6fcc2c887279e6c03b2e7df0f869bd05c99faf28;p=mesa.git 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 Signed-off-by: Axel Davy --- 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;