diff options
author | Marek Olšák <[email protected]> | 2017-02-16 11:39:01 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-02-18 01:22:08 +0100 |
commit | 22b8a773e1edb6d1a39b2ab9f715be1138976a2b (patch) | |
tree | 823b654e75ac94b55137c4299b81117b3bf229b5 /src/gallium/drivers/radeonsi | |
parent | 054f853035bc3f4c3ff2b0732779fb21775893ef (diff) |
radeonsi: use SI_MAX_ATTRIBS where it should be used
for consistency; no change in behavior
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 59022ed2af5..8f636af96aa 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -971,7 +971,7 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx) desc->buffer, RADEON_USAGE_READ, RADEON_PRIO_DESCRIPTORS); - assert(count <= SI_NUM_VERTEX_BUFFERS); + assert(count <= SI_MAX_ATTRIBS); for (i = 0; i < count; i++) { struct pipe_vertex_element *ve = &velems->elements[i]; diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 61bcd2c3654..a947bad5e42 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -622,7 +622,7 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH: return 16384; case PIPE_SHADER_CAP_MAX_INPUTS: - return shader == PIPE_SHADER_VERTEX ? SI_NUM_VERTEX_BUFFERS : 32; + return shader == PIPE_SHADER_VERTEX ? SI_MAX_ATTRIBS : 32; case PIPE_SHADER_CAP_MAX_OUTPUTS: return shader == PIPE_SHADER_FRAGMENT ? 8 : 32; case PIPE_SHADER_CAP_MAX_TEMPS: diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index de427789aae..d3e3984e697 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5266,7 +5266,7 @@ static void create_function(struct si_shader_context *ctx) struct lp_build_tgsi_context *bld_base = &ctx->bld_base; struct gallivm_state *gallivm = bld_base->base.gallivm; struct si_shader *shader = ctx->shader; - LLVMTypeRef params[SI_NUM_PARAMS + SI_NUM_VERTEX_BUFFERS], v3i32; + LLVMTypeRef params[SI_NUM_PARAMS + SI_MAX_ATTRIBS], v3i32; LLVMTypeRef returns[16+32*4]; unsigned i, last_sgpr, num_params, num_return_sgprs; unsigned num_returns = 0; @@ -5282,7 +5282,7 @@ static void create_function(struct si_shader_context *ctx) switch (ctx->type) { case PIPE_SHADER_VERTEX: - params[SI_PARAM_VERTEX_BUFFERS] = const_array(ctx->v16i8, SI_NUM_VERTEX_BUFFERS); + params[SI_PARAM_VERTEX_BUFFERS] = const_array(ctx->v16i8, SI_MAX_ATTRIBS); params[SI_PARAM_BASE_VERTEX] = ctx->i32; params[SI_PARAM_START_INSTANCE] = ctx->i32; params[SI_PARAM_DRAWID] = ctx->i32; diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index b7cf7ea7dbd..0bb0f18f41a 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -341,7 +341,7 @@ struct si_shader_selector { /* Common VS bits between the shader key and the prolog key. */ struct si_vs_prolog_bits { - unsigned instance_divisors[SI_NUM_VERTEX_BUFFERS]; + unsigned instance_divisors[SI_MAX_ATTRIBS]; }; /* Common VS bits between the shader key and the epilog key. */ |