gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #define

PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS
were all defined to the same value (16).

In various places we're creating arrays such as
sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming
the same number of max samplers for all shader stages anyway.

Of course, drivers are still free to advertise different numbers of max
samplers for different shaders.
This commit is contained in:
Brian Paul
2012-08-09 20:59:44 -06:00
parent a2c1df4c9a
commit cab2fed135
21 changed files with 41 additions and 49 deletions

View File

@@ -256,8 +256,6 @@ struct cso_context *cso_create_context( struct pipe_context *pipe )
if (ctx == NULL) if (ctx == NULL)
goto out; goto out;
assert(PIPE_MAX_SAMPLERS == PIPE_MAX_VERTEX_SAMPLERS);
ctx->cache = cso_cache_create(); ctx->cache = cso_cache_create();
if (ctx->cache == NULL) if (ctx->cache == NULL)
goto out; goto out;

View File

@@ -164,7 +164,7 @@ create_jit_context_type(struct gallivm_state *gallivm,
DRAW_TOTAL_CLIP_PLANES), 0); DRAW_TOTAL_CLIP_PLANES), 0);
elem_types[3] = LLVMPointerType(float_type, 0); /* viewport */ elem_types[3] = LLVMPointerType(float_type, 0); /* viewport */
elem_types[4] = LLVMArrayType(texture_type, elem_types[4] = LLVMArrayType(texture_type,
PIPE_MAX_VERTEX_SAMPLERS); /* textures */ PIPE_MAX_SAMPLERS); /* textures */
context_type = LLVMStructTypeInContext(gallivm->context, elem_types, context_type = LLVMStructTypeInContext(gallivm->context, elem_types,
Elements(elem_types), 0); Elements(elem_types), 0);
#if HAVE_LLVM < 0x0300 #if HAVE_LLVM < 0x0300
@@ -1371,7 +1371,7 @@ draw_llvm_set_mapped_texture(struct draw_context *draw,
unsigned j; unsigned j;
struct draw_jit_texture *jit_tex; struct draw_jit_texture *jit_tex;
assert(sampler_idx < PIPE_MAX_VERTEX_SAMPLERS); assert(sampler_idx < Elements(draw->llvm->jit_context.textures));
jit_tex = &draw->llvm->jit_context.textures[sampler_idx]; jit_tex = &draw->llvm->jit_context.textures[sampler_idx];

View File

@@ -97,7 +97,7 @@ struct draw_jit_context
float (*planes) [DRAW_TOTAL_CLIP_PLANES][4]; float (*planes) [DRAW_TOTAL_CLIP_PLANES][4];
float *viewport; float *viewport;
struct draw_jit_texture textures[PIPE_MAX_VERTEX_SAMPLERS]; struct draw_jit_texture textures[PIPE_MAX_SAMPLERS];
}; };
@@ -184,7 +184,7 @@ struct draw_llvm_variant_key
#define DRAW_LLVM_MAX_VARIANT_KEY_SIZE \ #define DRAW_LLVM_MAX_VARIANT_KEY_SIZE \
(sizeof(struct draw_llvm_variant_key) + \ (sizeof(struct draw_llvm_variant_key) + \
PIPE_MAX_VERTEX_SAMPLERS * sizeof(struct lp_sampler_static_state) + \ PIPE_MAX_SAMPLERS * sizeof(struct lp_sampler_static_state) + \
(PIPE_MAX_ATTRIBS-1) * sizeof(struct pipe_vertex_element)) (PIPE_MAX_ATTRIBS-1) * sizeof(struct pipe_vertex_element))

View File

@@ -98,7 +98,7 @@ draw_llvm_texture_member(const struct lp_sampler_dynamic_state *base,
LLVMValueRef ptr; LLVMValueRef ptr;
LLVMValueRef res; LLVMValueRef res;
debug_assert(unit < PIPE_MAX_VERTEX_SAMPLERS); debug_assert(unit < PIPE_MAX_SAMPLERS);
/* context[0] */ /* context[0] */
indices[0] = lp_build_const_int32(gallivm, 0); indices[0] = lp_build_const_int32(gallivm, 0);
@@ -180,7 +180,7 @@ draw_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base,
{ {
struct draw_llvm_sampler_soa *sampler = (struct draw_llvm_sampler_soa *)base; struct draw_llvm_sampler_soa *sampler = (struct draw_llvm_sampler_soa *)base;
assert(unit < PIPE_MAX_VERTEX_SAMPLERS); assert(unit < PIPE_MAX_SAMPLERS);
lp_build_sample_soa(gallivm, lp_build_sample_soa(gallivm,
&sampler->dynamic_state.static_state[unit], &sampler->dynamic_state.static_state[unit],
@@ -207,7 +207,7 @@ draw_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base,
{ {
struct draw_llvm_sampler_soa *sampler = (struct draw_llvm_sampler_soa *)base; struct draw_llvm_sampler_soa *sampler = (struct draw_llvm_sampler_soa *)base;
assert(unit < PIPE_MAX_VERTEX_SAMPLERS); assert(unit < PIPE_MAX_SAMPLERS);
lp_build_size_query_soa(gallivm, lp_build_size_query_soa(gallivm,
&sampler->dynamic_state.static_state[unit], &sampler->dynamic_state.static_state[unit],

View File

@@ -208,10 +208,10 @@ galahad_context_bind_vertex_sampler_states(struct pipe_context *_pipe,
struct galahad_context *glhd_pipe = galahad_context(_pipe); struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe; struct pipe_context *pipe = glhd_pipe->pipe;
if (num_samplers > PIPE_MAX_VERTEX_SAMPLERS) { if (num_samplers > PIPE_MAX_SAMPLERS) {
glhd_error("%u vertex samplers requested, " glhd_error("%u vertex samplers requested, "
"but only %u are permitted by API", "but only %u are permitted by API",
num_samplers, PIPE_MAX_VERTEX_SAMPLERS); num_samplers, PIPE_MAX_SAMPLERS);
} }
pipe->bind_vertex_sampler_states(pipe, pipe->bind_vertex_sampler_states(pipe,
@@ -587,14 +587,14 @@ galahad_context_set_vertex_sampler_views(struct pipe_context *_pipe,
{ {
struct galahad_context *glhd_pipe = galahad_context(_pipe); struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe; struct pipe_context *pipe = glhd_pipe->pipe;
struct pipe_sampler_view *unwrapped_views[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view **views = NULL; struct pipe_sampler_view **views = NULL;
unsigned i; unsigned i;
if (_views) { if (_views) {
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
unwrapped_views[i] = galahad_sampler_view_unwrap(_views[i]); unwrapped_views[i] = galahad_sampler_view_unwrap(_views[i]);
for (; i < PIPE_MAX_VERTEX_SAMPLERS; i++) for (; i < Elements(unwrapped_views); i++)
unwrapped_views[i] = NULL; unwrapped_views[i] = NULL;
views = unwrapped_views; views = unwrapped_views;

View File

@@ -230,7 +230,7 @@ struct i915_context {
*/ */
const struct i915_blend_state *blend; const struct i915_blend_state *blend;
const struct i915_sampler_state *sampler[PIPE_MAX_SAMPLERS]; const struct i915_sampler_state *sampler[PIPE_MAX_SAMPLERS];
struct pipe_sampler_state *vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_sampler_state *vertex_samplers[PIPE_MAX_SAMPLERS];
const struct i915_depth_stencil_state *depth_stencil; const struct i915_depth_stencil_state *depth_stencil;
const struct i915_rasterizer_state *rasterizer; const struct i915_rasterizer_state *rasterizer;
@@ -250,8 +250,8 @@ struct i915_context {
unsigned dirty; unsigned dirty;
struct pipe_resource *mapped_vs_tex[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_resource *mapped_vs_tex[PIPE_MAX_SAMPLERS];
struct i915_winsys_buffer* mapped_vs_tex_buffer[PIPE_MAX_VERTEX_SAMPLERS]; struct i915_winsys_buffer* mapped_vs_tex_buffer[PIPE_MAX_SAMPLERS];
unsigned num_samplers; unsigned num_samplers;
unsigned num_fragment_sampler_views; unsigned num_fragment_sampler_views;

View File

@@ -107,7 +107,7 @@ i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_sha
switch (cap) { switch (cap) {
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
if (debug_get_bool_option("DRAW_USE_LLVM", TRUE)) if (debug_get_bool_option("DRAW_USE_LLVM", TRUE))
return PIPE_MAX_VERTEX_SAMPLERS; return PIPE_MAX_SAMPLERS;
else else
return 0; return 0;
default: default:

View File

@@ -310,7 +310,7 @@ i915_bind_vertex_sampler_states(struct pipe_context *pipe,
struct i915_context *i915 = i915_context(pipe); struct i915_context *i915 = i915_context(pipe);
unsigned i; unsigned i;
assert(num_samplers <= PIPE_MAX_VERTEX_SAMPLERS); assert(num_samplers <= Elements(i915->vertex_samplers));
/* Check for no-op */ /* Check for no-op */
if (num_samplers == i915->num_vertex_samplers && if (num_samplers == i915->num_vertex_samplers &&
@@ -319,7 +319,7 @@ i915_bind_vertex_sampler_states(struct pipe_context *pipe,
for (i = 0; i < num_samplers; ++i) for (i = 0; i < num_samplers; ++i)
i915->vertex_samplers[i] = samplers[i]; i915->vertex_samplers[i] = samplers[i];
for (i = num_samplers; i < PIPE_MAX_VERTEX_SAMPLERS; ++i) for (i = num_samplers; i < Elements(i915->vertex_samplers); ++i)
i915->vertex_samplers[i] = NULL; i915->vertex_samplers[i] = NULL;
i915->num_vertex_samplers = num_samplers; i915->num_vertex_samplers = num_samplers;
@@ -374,11 +374,11 @@ i915_prepare_vertex_sampling(struct i915_context *i915)
unsigned num = i915->num_vertex_sampler_views; unsigned num = i915->num_vertex_sampler_views;
struct pipe_sampler_view **views = i915->vertex_sampler_views; struct pipe_sampler_view **views = i915->vertex_sampler_views;
assert(num <= PIPE_MAX_VERTEX_SAMPLERS); assert(num <= PIPE_MAX_SAMPLERS);
if (!num) if (!num)
return; return;
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
struct pipe_sampler_view *view = i < num ? views[i] : NULL; struct pipe_sampler_view *view = i < num ? views[i] : NULL;
if (view) { if (view) {
@@ -777,7 +777,7 @@ i915_set_vertex_sampler_views(struct pipe_context *pipe,
struct i915_context *i915 = i915_context(pipe); struct i915_context *i915 = i915_context(pipe);
uint i; uint i;
assert(num <= PIPE_MAX_VERTEX_SAMPLERS); assert(num <= Elements(i915->vertex_sampler_views));
/* Check for no-op */ /* Check for no-op */
if (num == i915->num_vertex_sampler_views && if (num == i915->num_vertex_sampler_views &&
@@ -785,7 +785,7 @@ i915_set_vertex_sampler_views(struct pipe_context *pipe,
return; return;
} }
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { for (i = 0; i < Elements(i915->vertex_sampler_views); i++) {
struct pipe_sampler_view *view = i < num ? views[i] : NULL; struct pipe_sampler_view *view = i < num ? views[i] : NULL;
pipe_sampler_view_reference(&i915->vertex_sampler_views[i], view); pipe_sampler_view_reference(&i915->vertex_sampler_views[i], view);

View File

@@ -517,14 +517,14 @@ identity_set_vertex_sampler_views(struct pipe_context *_pipe,
{ {
struct identity_context *id_pipe = identity_context(_pipe); struct identity_context *id_pipe = identity_context(_pipe);
struct pipe_context *pipe = id_pipe->pipe; struct pipe_context *pipe = id_pipe->pipe;
struct pipe_sampler_view *unwrapped_views[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view **views = NULL; struct pipe_sampler_view **views = NULL;
unsigned i; unsigned i;
if (_views) { if (_views) {
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
unwrapped_views[i] = identity_sampler_view_unwrap(_views[i]); unwrapped_views[i] = identity_sampler_view_unwrap(_views[i]);
for (; i < PIPE_MAX_VERTEX_SAMPLERS; i++) for (; i < Elements(unwrapped_views); i++)
unwrapped_views[i] = NULL; unwrapped_views[i] = NULL;
views = unwrapped_views; views = unwrapped_views;

View File

@@ -69,11 +69,11 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
pipe_surface_reference(&llvmpipe->framebuffer.zsbuf, NULL); pipe_surface_reference(&llvmpipe->framebuffer.zsbuf, NULL);
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { for (i = 0; i < Elements(llvmpipe->sampler_views[0]); i++) {
pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_FRAGMENT][i], NULL); pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_FRAGMENT][i], NULL);
} }
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { for (i = 0; i < Elements(llvmpipe->sampler_views[0]); i++) {
pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_VERTEX][i], NULL); pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_VERTEX][i], NULL);
} }

View File

@@ -86,7 +86,7 @@ struct llvmpipe_context {
int so_count[PIPE_MAX_SO_BUFFERS]; int so_count[PIPE_MAX_SO_BUFFERS];
int num_buffers; int num_buffers;
} so_target; } so_target;
struct pipe_resource *mapped_vs_tex[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_resource *mapped_vs_tex[PIPE_MAX_SAMPLERS];
unsigned num_samplers[PIPE_SHADER_TYPES]; unsigned num_samplers[PIPE_SHADER_TYPES];
unsigned num_sampler_views[PIPE_SHADER_TYPES]; unsigned num_sampler_views[PIPE_SHADER_TYPES];

View File

@@ -105,7 +105,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
{ {
switch (param) { switch (param) {
case PIPE_CAP_MAX_COMBINED_SAMPLERS: case PIPE_CAP_MAX_COMBINED_SAMPLERS:
return PIPE_MAX_SAMPLERS + PIPE_MAX_VERTEX_SAMPLERS; return 2 * PIPE_MAX_SAMPLERS; /* VS + FS samplers */
case PIPE_CAP_NPOT_TEXTURES: case PIPE_CAP_NPOT_TEXTURES:
return 1; return 1;
case PIPE_CAP_TWO_SIDED_STENCIL: case PIPE_CAP_TWO_SIDED_STENCIL:
@@ -234,7 +234,7 @@ llvmpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe
* the draw module. * the draw module.
*/ */
if (debug_get_bool_option("DRAW_USE_LLVM", TRUE)) if (debug_get_bool_option("DRAW_USE_LLVM", TRUE))
return PIPE_MAX_VERTEX_SAMPLERS; return PIPE_MAX_SAMPLERS;
else else
return 0; return 0;
default: default:

View File

@@ -234,11 +234,11 @@ llvmpipe_prepare_vertex_sampling(struct llvmpipe_context *lp,
uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS]; uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS];
const void *data[PIPE_MAX_TEXTURE_LEVELS]; const void *data[PIPE_MAX_TEXTURE_LEVELS];
assert(num <= PIPE_MAX_VERTEX_SAMPLERS); assert(num <= PIPE_MAX_SAMPLERS);
if (!num) if (!num)
return; return;
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
struct pipe_sampler_view *view = i < num ? views[i] : NULL; struct pipe_sampler_view *view = i < num ? views[i] : NULL;
if (view) { if (view) {

View File

@@ -753,7 +753,7 @@ rbug_set_vertex_sampler_views(struct pipe_context *_pipe,
{ {
struct rbug_context *rb_pipe = rbug_context(_pipe); struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe; struct pipe_context *pipe = rb_pipe->pipe;
struct pipe_sampler_view *unwrapped_views[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view **views = NULL; struct pipe_sampler_view **views = NULL;
unsigned i; unsigned i;

View File

@@ -54,8 +54,8 @@ struct rbug_context {
struct rbug_resource *fs_texs[PIPE_MAX_SAMPLERS]; struct rbug_resource *fs_texs[PIPE_MAX_SAMPLERS];
unsigned num_fs_views; unsigned num_fs_views;
struct rbug_sampler_view *vs_views[PIPE_MAX_VERTEX_SAMPLERS]; struct rbug_sampler_view *vs_views[PIPE_MAX_SAMPLERS];
struct rbug_resource *vs_texs[PIPE_MAX_VERTEX_SAMPLERS]; struct rbug_resource *vs_texs[PIPE_MAX_SAMPLERS];
unsigned num_vs_views; unsigned num_vs_views;
unsigned nr_cbufs; unsigned nr_cbufs;

View File

@@ -216,10 +216,6 @@ softpipe_create_context( struct pipe_screen *screen,
struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context); struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context);
uint i, sh; uint i, sh;
/* Check since we have arrays[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] */
STATIC_ASSERT(PIPE_MAX_SAMPLERS == PIPE_MAX_VERTEX_SAMPLERS);
STATIC_ASSERT(PIPE_MAX_SAMPLERS == PIPE_MAX_GEOMETRY_SAMPLERS);
util_init_math(); util_init_math();
softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE ); softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE );
@@ -290,13 +286,13 @@ softpipe_create_context( struct pipe_screen *screen,
draw_texture_samplers(softpipe->draw, draw_texture_samplers(softpipe->draw,
PIPE_SHADER_VERTEX, PIPE_SHADER_VERTEX,
PIPE_MAX_VERTEX_SAMPLERS, PIPE_MAX_SAMPLERS,
(struct tgsi_sampler **) (struct tgsi_sampler **)
softpipe->tgsi.samplers_list[PIPE_SHADER_VERTEX]); softpipe->tgsi.samplers_list[PIPE_SHADER_VERTEX]);
draw_texture_samplers(softpipe->draw, draw_texture_samplers(softpipe->draw,
PIPE_SHADER_GEOMETRY, PIPE_SHADER_GEOMETRY,
PIPE_MAX_GEOMETRY_SAMPLERS, PIPE_MAX_SAMPLERS,
(struct tgsi_sampler **) (struct tgsi_sampler **)
softpipe->tgsi.samplers_list[PIPE_SHADER_GEOMETRY]); softpipe->tgsi.samplers_list[PIPE_SHADER_GEOMETRY]);

View File

@@ -79,7 +79,7 @@ struct softpipe_context {
struct pipe_framebuffer_state framebuffer; struct pipe_framebuffer_state framebuffer;
struct pipe_poly_stipple poly_stipple; struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor; struct pipe_scissor_state scissor;
struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_GEOMETRY_SAMPLERS]; struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
struct pipe_viewport_state viewport; struct pipe_viewport_state viewport;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];

View File

@@ -67,7 +67,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
{ {
switch (param) { switch (param) {
case PIPE_CAP_MAX_COMBINED_SAMPLERS: case PIPE_CAP_MAX_COMBINED_SAMPLERS:
return PIPE_MAX_SAMPLERS + PIPE_MAX_VERTEX_SAMPLERS; return 2 * PIPE_MAX_SAMPLERS; /* VS + FS */
case PIPE_CAP_NPOT_TEXTURES: case PIPE_CAP_NPOT_TEXTURES:
return 1; return 1;
case PIPE_CAP_TWO_SIDED_STENCIL: case PIPE_CAP_TWO_SIDED_STENCIL:
@@ -190,7 +190,7 @@ softpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe
/* Softpipe doesn't yet know how to tell draw/llvm about textures */ /* Softpipe doesn't yet know how to tell draw/llvm about textures */
return 0; return 0;
else else
return PIPE_MAX_VERTEX_SAMPLERS; return PIPE_MAX_SAMPLERS;
default: default:
if (sp_screen->use_llvm) if (sp_screen->use_llvm)
return draw_get_shader_param(shader, param); return draw_get_shader_param(shader, param);

View File

@@ -998,7 +998,7 @@ trace_context_set_vertex_sampler_views(struct pipe_context *_pipe,
struct trace_context *tr_ctx = trace_context(_pipe); struct trace_context *tr_ctx = trace_context(_pipe);
struct trace_sampler_view *tr_view; struct trace_sampler_view *tr_view;
struct pipe_context *pipe = tr_ctx->pipe; struct pipe_context *pipe = tr_ctx->pipe;
struct pipe_sampler_view *unwrapped_views[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
unsigned i; unsigned i;
if (!pipe->set_vertex_sampler_views) if (!pipe->set_vertex_sampler_views)

View File

@@ -58,8 +58,6 @@ extern "C" {
#define PIPE_MAX_COLOR_BUFS 8 #define PIPE_MAX_COLOR_BUFS 8
#define PIPE_MAX_CONSTANT_BUFFERS 32 #define PIPE_MAX_CONSTANT_BUFFERS 32
#define PIPE_MAX_SAMPLERS 16 #define PIPE_MAX_SAMPLERS 16
#define PIPE_MAX_VERTEX_SAMPLERS 16
#define PIPE_MAX_GEOMETRY_SAMPLERS 16
#define PIPE_MAX_SHADER_INPUTS 32 #define PIPE_MAX_SHADER_INPUTS 32
#define PIPE_MAX_SHADER_OUTPUTS 32 #define PIPE_MAX_SHADER_OUTPUTS 32
#define PIPE_MAX_SHADER_SAMPLER_VIEWS 32 #define PIPE_MAX_SHADER_SAMPLER_VIEWS 32

View File

@@ -99,7 +99,7 @@ struct st_context
struct pipe_depth_stencil_alpha_state depth_stencil; struct pipe_depth_stencil_alpha_state depth_stencil;
struct pipe_rasterizer_state rasterizer; struct pipe_rasterizer_state rasterizer;
struct pipe_sampler_state fragment_samplers[PIPE_MAX_SAMPLERS]; struct pipe_sampler_state fragment_samplers[PIPE_MAX_SAMPLERS];
struct pipe_sampler_state vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_sampler_state vertex_samplers[PIPE_MAX_SAMPLERS];
struct pipe_clip_state clip; struct pipe_clip_state clip;
struct { struct {
void *ptr; void *ptr;
@@ -107,7 +107,7 @@ struct st_context
} constants[PIPE_SHADER_TYPES]; } constants[PIPE_SHADER_TYPES];
struct pipe_framebuffer_state framebuffer; struct pipe_framebuffer_state framebuffer;
struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS]; struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS]; struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_SAMPLERS];
struct pipe_scissor_state scissor; struct pipe_scissor_state scissor;
struct pipe_viewport_state viewport; struct pipe_viewport_state viewport;
unsigned sample_mask; unsigned sample_mask;