This allows us to query the uniform size required to store the
state value.
CC: <stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5656>
}
}
+unsigned
+_mesa_program_state_value_size(const gl_state_index16 state[STATE_LENGTH])
+{
+ if (state[0] == STATE_LIGHT && state[2] == STATE_SPOT_CUTOFF)
+ return 1;
+
+ /* Everything else is packed into vec4s */
+ return 4;
+}
/**
* Return a bitmask of the Mesa state flags (_NEW_* values) which would
_mesa_load_state_parameters(struct gl_context *ctx,
struct gl_program_parameter_list *paramList);
+extern unsigned
+_mesa_program_state_value_size(const gl_state_index16 state[STATE_LENGTH]);
extern GLbitfield
_mesa_program_state_flags(const gl_state_index16 state[STATE_LENGTH]);