void (*driver_bind_fs_state)(struct pipe_context *, void *);
void (*driver_delete_fs_state)(struct pipe_context *, void *);
- void (*driver_bind_sampler_states)(struct pipe_context *, unsigned, unsigned,
+ void (*driver_bind_sampler_states)(struct pipe_context *,
+ enum pipe_shader_type, unsigned,
unsigned, void **);
- void (*driver_set_sampler_views)(struct pipe_context *, unsigned shader,
+ void (*driver_set_sampler_views)(struct pipe_context *,
+ enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view **);
};
uint i;
for (i = decl->Range.First;
i <= decl->Range.Last; i++) {
- aactx->samplersUsed |= 1 << i;
+ aactx->samplersUsed |= 1u << i;
}
}
else if (decl->Declaration.File == TGSI_FILE_SAMPLER_VIEW) {
struct aa_transform_context *aactx = (struct aa_transform_context *) ctx;
uint i;
+ STATIC_ASSERT(sizeof(aactx->samplersUsed) * 8 >= PIPE_MAX_SAMPLERS);
+
/* find free sampler */
aactx->freeSampler = free_bit(aactx->samplersUsed);
- if (aactx->freeSampler >= PIPE_MAX_SAMPLERS)
+ if (aactx->freeSampler < 0 || aactx->freeSampler >= PIPE_MAX_SAMPLERS)
aactx->freeSampler = PIPE_MAX_SAMPLERS - 1;
/* find two free temp regs */
if (aactx->colorOutput != -1) {
/* insert texture sampling code for antialiasing. */
- /* TEX texTemp, input_coord, sampler */
- tgsi_transform_tex_2d_inst(ctx,
- TGSI_FILE_TEMPORARY, aactx->texTemp,
- TGSI_FILE_INPUT, aactx->maxInput + 1,
- aactx->freeSampler);
+ /* TEX texTemp, input_coord, sampler, 2D */
+ tgsi_transform_tex_inst(ctx,
+ TGSI_FILE_TEMPORARY, aactx->texTemp,
+ TGSI_FILE_INPUT, aactx->maxInput + 1,
+ TGSI_TEXTURE_2D, aactx->freeSampler);
/* MOV rgb */
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_MOV,
TGSI_FILE_OUTPUT, aactx->colorOutput,
TGSI_WRITEMASK_W,
TGSI_FILE_TEMPORARY, aactx->colorTemp,
- TGSI_FILE_TEMPORARY, aactx->texTemp);
+ TGSI_FILE_TEMPORARY, aactx->texTemp, false);
}
}
static void
-aaline_bind_sampler_states(struct pipe_context *pipe, unsigned shader,
+aaline_bind_sampler_states(struct pipe_context *pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned num, void **sampler)
{
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
static void
-aaline_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+aaline_set_sampler_views(struct pipe_context *pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned num,
struct pipe_sampler_view **views)
{