#define IS_VS (tx->processor == TGSI_PROCESSOR_VERTEX)
#define IS_PS (tx->processor == TGSI_PROCESSOR_FRAGMENT)
+#define NINE_MAX_CONST_F_SHADER (tx->processor == TGSI_PROCESSOR_VERTEX ? NINE_MAX_CONST_F : NINE_MAX_CONST_F_PS3)
#define FAILURE_VOID(cond) if ((cond)) {tx->failure=1;return;}
tx_lconstf(struct shader_translator *tx, struct ureg_src *src, INT index)
{
INT i;
- if (index < 0 || index >= (NINE_MAX_CONST_F * 2)) {
+ if (index < 0 || index >= NINE_MAX_CONST_F_SHADER) {
tx->failure = TRUE;
return FALSE;
}
{
unsigned n;
- /* Anno1404 sets out of range constants. */
- FAILURE_VOID(index < 0 || index >= (NINE_MAX_CONST_F * 2))
- if (index >= NINE_MAX_CONST_F)
+ FAILURE_VOID(index < 0 || index >= NINE_MAX_CONST_F_SHADER)
+ if (IS_VS && index >= NINE_MAX_CONST_F_SHADER)
WARN("lconstf index %i too high, indirect access won't work\n", index);
for (n = 0; n < tx->num_lconstf; ++n)
#define NINE_MAX_SIMULTANEOUS_RENDERTARGETS 4
+#define NINE_MAX_CONST_F_PS3 224
#define NINE_MAX_CONST_F 256
#define NINE_MAX_CONST_I 16
#define NINE_MAX_CONST_B 16