[Mesa-dev] [PATCH 04/43] st/nine: Print warnings for r500 when shader is likely to go wrong
Axel Davy
axel.davy at ens.fr
Fri Jan 30 12:34:03 PST 2015
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.
Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
src/gallium/state_trackers/nine/nine_shader.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index 8a8695a..66cfc1f 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->num_float_consts_slots > device->max_vs_const_f &&
+ (info->num_int_consts_slots || info->num_bool_consts_slots))
+ ERR("Overlapping constant slots. The shader is likely to be buggy\n");
+
+
if (tx->indirect_const_access) /* vs only */
info->num_float_consts_slots = device->max_vs_const_f;
--
2.1.0
More information about the mesa-dev
mailing list