llvmpipe: check bitshift against PIPE_MAX_SHADER_OUTPUTS
This commit is contained in:
@@ -188,8 +188,11 @@ setup_point_coefficients( struct lp_setup_context *setup,
|
||||
*/
|
||||
if (shader->info.input_semantic_name[slot] == TGSI_SEMANTIC_GENERIC) {
|
||||
const int index = shader->info.input_semantic_index[slot];
|
||||
|
||||
if (setup->sprite_coord_enable & (1 << index)) {
|
||||
/* Note that sprite_coord enable is a bitfield of
|
||||
* PIPE_MAX_SHADER_OUTPUTS bits.
|
||||
*/
|
||||
if (index < PIPE_MAX_SHADER_OUTPUTS &&
|
||||
(setup->sprite_coord_enable & (1 << index))) {
|
||||
for (i = 0; i < NUM_CHANNELS; i++)
|
||||
if (usage_mask & (1 << i))
|
||||
perspective_coef(setup, point, info, slot+1, vert_attr, i,
|
||||
|
||||
Reference in New Issue
Block a user