{
debug_assert(shader_type == PIPE_SHADER_VERTEX ||
shader_type == PIPE_SHADER_GEOMETRY);
- debug_assert(slot < PIPE_MAX_CONSTANT);
+ debug_assert(slot < PIPE_MAX_CONSTANT_BUFFERS);
if (shader_type == PIPE_SHADER_VERTEX) {
draw->pt.user.vs_constants[slot] = buffer;
void draw_geometry_shader_run(struct draw_geometry_shader *shader,
const float (*input)[4],
float (*output)[4],
- const void *constants[PIPE_MAX_CONSTANT],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
unsigned count,
unsigned input_stride,
unsigned vertex_size)
unsigned num_primitives = count/num_vertices;
unsigned inputs_from_vs = 0;
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
machine->Consts[i] = constants[i];
}
void draw_geometry_shader_run(struct draw_geometry_shader *shader,
const float (*input)[4],
float (*output)[4],
- const void *constants[PIPE_MAX_CONSTANT],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
unsigned count,
unsigned input_stride,
unsigned output_stride);
const void *vbuffer[PIPE_MAX_ATTRIBS];
/** constant buffer (for vertex/geometry shader) */
- const void *vs_constants[PIPE_MAX_CONSTANT];
- const void *gs_constants[PIPE_MAX_CONSTANT];
+ const void *vs_constants[PIPE_MAX_CONSTANT_BUFFERS];
+ const void *gs_constants[PIPE_MAX_CONSTANT_BUFFERS];
} user;
boolean test_fse; /* enable FSE even though its not correct (eg for softpipe) */
struct aos_machine *aos_machine;
- const void *aligned_constants[PIPE_MAX_CONSTANT];
+ const void *aligned_constants[PIPE_MAX_CONSTANT_BUFFERS];
- const void *aligned_constant_storage[PIPE_MAX_CONSTANT];
- unsigned const_storage_size[PIPE_MAX_CONSTANT];
+ const void *aligned_constant_storage[PIPE_MAX_CONSTANT_BUFFERS];
+ unsigned const_storage_size[PIPE_MAX_CONSTANT_BUFFERS];
struct translate *fetch;
if (draw->vs.aos_machine)
draw_vs_aos_machine_destroy(draw->vs.aos_machine);
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
if (draw->vs.aligned_constant_storage[i]) {
align_free((void *)draw->vs.aligned_constant_storage[i]);
}
void (*run_linear)( struct draw_vertex_shader *shader,
const float (*input)[4],
float (*output)[4],
- const void *constants[PIPE_MAX_CONSTANT],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
unsigned count,
unsigned input_stride,
unsigned output_stride );
if (0) debug_printf("%s %d\n", __FUNCTION__, count);
machine->internal[IMM_PSIZE][0] = vaos->draw->rasterizer->point_size;
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
machine->constants[i] = vaos->draw->vs.aligned_constants[i];
}
machine->immediates = vaos->base.vs->immediates;
vaos->base.key.const_vbuffers);
machine->internal[IMM_PSIZE][0] = vaos->draw->rasterizer->point_size;
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
machine->constants[i] = vaos->draw->vs.aligned_constants[i];
}
machine->immediates = vaos->base.vs->immediates;
ushort fpucntl; /* one of FPU_* above */
const float (*immediates)[4]; /* points to shader data */
- const void *constants[PIPE_MAX_CONSTANT]; /* points to draw data */
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS]; /* points to draw data */
const struct aos_buffer *buffer; /* points to ? */
};
vs_exec_run_linear( struct draw_vertex_shader *shader,
const float (*input)[4],
float (*output)[4],
- const void *constants[PIPE_MAX_CONSTANT],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
unsigned count,
unsigned input_stride,
unsigned output_stride )
unsigned int i, j;
unsigned slot;
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
machine->Consts[i] = constants[i];
}
vs_llvm_run_linear( struct draw_vertex_shader *base,
const float (*input)[4],
float (*output)[4],
- const void *constants[PIPE_MAX_CONSTANT],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
unsigned count,
unsigned input_stride,
unsigned output_stride )
vs_ppc_run_linear( struct draw_vertex_shader *base,
const float (*input)[4],
float (*output)[4],
- const void *constants[PIPE_MAX_CONSTANT],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
unsigned count,
unsigned input_stride,
unsigned output_stride )
vs_sse_run_linear( struct draw_vertex_shader *base,
const float (*input)[4],
float (*output)[4],
- const void *constants[PIPE_MAX_CONSTANT],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
unsigned count,
unsigned input_stride,
unsigned output_stride )
switch (file) {
case TGSI_FILE_CONSTANT:
for (i = 0; i < QUAD_SIZE; i++) {
- assert(index2D->i[i] >= 0 && index2D->i[i] < PIPE_MAX_CONSTANT);
+ assert(index2D->i[i] >= 0 && index2D->i[i] < PIPE_MAX_CONSTANT_BUFFERS);
assert(mach->Consts[index2D->i[i]]);
if (index->i[i] < 0) {
struct tgsi_sampler **Samplers;
unsigned ImmLimit;
- const void *Consts[PIPE_MAX_CONSTANT];
+ const void *Consts[PIPE_MAX_CONSTANT_BUFFERS];
const struct tgsi_token *Tokens; /**< Declarations, instructions */
unsigned Processor; /**< TGSI_PROCESSOR_x */
unsigned temps_active[UREG_MAX_TEMP / 32];
unsigned nr_temps;
- struct const_decl const_decls[PIPE_MAX_CONSTANT];
+ struct const_decl const_decls[PIPE_MAX_CONSTANT_BUFFERS];
unsigned property_gs_input_prim;
{
struct const_decl *decl = &ureg->const_decls[index2D];
- assert(index2D < PIPE_MAX_CONSTANT);
+ assert(index2D < PIPE_MAX_CONSTANT_BUFFERS);
if (decl->nr_constant_ranges < UREG_MAX_CONSTANT_RANGE) {
uint i = decl->nr_constant_ranges++;
ureg->sampler[i].Index, 1 );
}
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
struct const_decl *decl = &ureg->const_decls[i];
if (decl->nr_constant_ranges) {
for (i = 0; i < PIPE_SHADER_TYPES; i++) {
uint j;
- for (j = 0; j < PIPE_MAX_CONSTANT; j++) {
+ for (j = 0; j < PIPE_MAX_CONSTANT_BUFFERS; j++) {
if (softpipe->constants[i][j]) {
pipe_buffer_reference(&softpipe->constants[i][j], NULL);
}
/** Other rendering state */
struct pipe_blend_color blend_color;
struct pipe_clip_state clip;
- struct pipe_buffer *constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT];
+ struct pipe_buffer *constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS];
struct pipe_framebuffer_state framebuffer;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
ubyte *mapped_vbuffer[PIPE_MAX_ATTRIBS];
/** Mapped constant buffers */
- void *mapped_constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT];
+ void *mapped_constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS];
/** Vertex format */
struct vertex_info vertex_info;
for (i = 0; i < PIPE_SHADER_TYPES; i++) {
uint j;
- for (j = 0; j < PIPE_MAX_CONSTANT; j++) {
+ for (j = 0; j < PIPE_MAX_CONSTANT_BUFFERS; j++) {
if (sp->constants[i][j] && sp->constants[i][j]->size) {
sp->mapped_constants[i][j] = ws->buffer_map(ws,
sp->constants[i][j],
}
}
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
if (sp->constants[PIPE_SHADER_VERTEX][i]) {
draw_set_mapped_constant_buffer(sp->draw,
PIPE_SHADER_VERTEX,
*/
draw_flush(sp->draw);
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
draw_set_mapped_constant_buffer(sp->draw,
PIPE_SHADER_VERTEX,
i,
for (i = 0; i < PIPE_SHADER_TYPES; i++) {
uint j;
- for (j = 0; j < PIPE_MAX_CONSTANT; j++) {
+ for (j = 0; j < PIPE_MAX_CONSTANT_BUFFERS; j++) {
if (sp->constants[i][j] && sp->constants[i][j]->size) {
ws->buffer_unmap(ws, sp->constants[i][j]);
}
struct tgsi_exec_machine *machine = qss->machine;
unsigned i, pass = 0;
- for (i = 0; i < PIPE_MAX_CONSTANT; i++) {
+ for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) {
machine->Consts[i] = softpipe->mapped_constants[PIPE_SHADER_FRAGMENT][i];
}
machine->InterpCoefs = quads[0]->coef;
struct softpipe_context *softpipe = softpipe_context(pipe);
assert(shader < PIPE_SHADER_TYPES);
- assert(index < PIPE_MAX_CONSTANT);
+ assert(index < PIPE_MAX_CONSTANT_BUFFERS);
draw_flush(softpipe->draw);
#define PIPE_MAX_ATTRIBS 32
#define PIPE_MAX_CLIP_PLANES 6
#define PIPE_MAX_COLOR_BUFS 8
-#define PIPE_MAX_CONSTANT 32
+#define PIPE_MAX_CONSTANT_BUFFERS 32
#define PIPE_MAX_SAMPLERS 16
#define PIPE_MAX_VERTEX_SAMPLERS 16
#define PIPE_MAX_SHADER_INPUTS 16