diff options
author | Eric Anholt <[email protected]> | 2019-01-18 15:53:06 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-01-27 08:30:03 -0800 |
commit | 533b3f054152f1eab3b1880b14b744afc03294ca (patch) | |
tree | dc218da7e9ffea564085a1629ff73be933480684 | |
parent | b4870a15aea88d1af1f49f558841da04f1f1f30a (diff) |
v3d: Rename gallium-local limits defines from VC5 to V3D.
The compiler has its limits under V3D_* (like most V3D stuff), so sync up
with that.
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_job.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_program.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_resource.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_screen.h | 10 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_draw.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_emit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_rcl.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_state.c | 10 |
11 files changed, 33 insertions, 33 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index 104096d5248..7e9bc3d22db 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -224,7 +224,7 @@ v3d_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) V3D_DEBUG |= saved_shaderdb_flag; - v3d->sample_mask = (1 << VC5_MAX_SAMPLES) - 1; + v3d->sample_mask = (1 << V3D_MAX_SAMPLES) - 1; v3d->active_queries = true; return &v3d->base; diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index 136d8506597..2ced7c8aa31 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -190,10 +190,10 @@ struct v3d_vertexbuf_stateobj { }; struct v3d_vertex_stateobj { - struct pipe_vertex_element pipe[VC5_MAX_ATTRIBUTES]; + struct pipe_vertex_element pipe[V3D_MAX_ATTRIBUTES]; unsigned num_elements; - uint8_t attrs[16 * VC5_MAX_ATTRIBUTES]; + uint8_t attrs[16 * V3D_MAX_ATTRIBUTES]; struct pipe_resource *defaults; uint32_t defaults_offset; }; diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c index 5928e98a71c..87eede2cd9c 100644 --- a/src/gallium/drivers/v3d/v3d_job.c +++ b/src/gallium/drivers/v3d/v3d_job.c @@ -62,7 +62,7 @@ v3d_job_free(struct v3d_context *v3d, struct v3d_job *job) } } - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { if (job->cbufs[i]) { remove_from_ht(v3d->write_jobs, job->cbufs[i]->texture); pipe_surface_reference(&job->cbufs[i], NULL); @@ -204,7 +204,7 @@ v3d_job_set_tile_buffer_size(struct v3d_job *job) tile_size_index++; int max_bpp = RENDER_TARGET_MAXIMUM_32BPP; - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { if (job->cbufs[i]) { struct v3d_surface *surf = v3d_surface(job->cbufs[i]); max_bpp = MAX2(max_bpp, surf->internal_bpp); @@ -251,7 +251,7 @@ v3d_get_job(struct v3d_context *v3d, */ struct v3d_job *job = v3d_job_create(v3d); - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { if (cbufs[i]) { v3d_flush_jobs_reading_resource(v3d, cbufs[i]->texture); pipe_surface_reference(&job->cbufs[i], cbufs[i]); @@ -267,7 +267,7 @@ v3d_get_job(struct v3d_context *v3d, job->msaa = true; } - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { if (cbufs[i]) _mesa_hash_table_insert(v3d->write_jobs, cbufs[i]->texture, job); diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index a5b3f2ebfd9..567af2ead44 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -515,7 +515,7 @@ v3d_update_compiled_fs(struct v3d_context *v3d, uint8_t prim_mode) if (job->msaa) { key->msaa = v3d->rasterizer->base.multisample; key->sample_coverage = (v3d->rasterizer->base.multisample && - v3d->sample_mask != (1 << VC5_MAX_SAMPLES) - 1); + v3d->sample_mask != (1 << V3D_MAX_SAMPLES) - 1); key->sample_alpha_to_coverage = v3d->blend->base.alpha_to_coverage; key->sample_alpha_to_one = v3d->blend->base.alpha_to_one; } diff --git a/src/gallium/drivers/v3d/v3d_resource.h b/src/gallium/drivers/v3d/v3d_resource.h index 2aa28627338..f0b7c26e048 100644 --- a/src/gallium/drivers/v3d/v3d_resource.h +++ b/src/gallium/drivers/v3d/v3d_resource.h @@ -123,7 +123,7 @@ struct v3d_resource { struct pipe_resource base; struct v3d_bo *bo; struct renderonly_scanout *scanout; - struct v3d_resource_slice slices[VC5_MAX_MIP_LEVELS]; + struct v3d_resource_slice slices[V3D_MAX_MIP_LEVELS]; uint32_t cube_map_stride; uint32_t size; int cpp; diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index bee036a96d3..81392c9ff83 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -181,7 +181,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: - return VC5_MAX_MIP_LEVELS; + return V3D_MAX_MIP_LEVELS; case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS: return 2048; @@ -260,14 +260,14 @@ v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_MAX_INPUTS: if (shader == PIPE_SHADER_FRAGMENT) - return VC5_MAX_FS_INPUTS / 4; + return V3D_MAX_FS_INPUTS / 4; else - return VC5_MAX_ATTRIBUTES; + return V3D_MAX_ATTRIBUTES; case PIPE_SHADER_CAP_MAX_OUTPUTS: if (shader == PIPE_SHADER_FRAGMENT) return 4; else - return VC5_MAX_FS_INPUTS / 4; + return V3D_MAX_FS_INPUTS / 4; case PIPE_SHADER_CAP_MAX_TEMPS: return 256; /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: @@ -300,7 +300,7 @@ v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return 1; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: - return VC5_MAX_TEXTURE_SAMPLERS; + return V3D_MAX_TEXTURE_SAMPLERS; case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS: return PIPE_MAX_SHADER_BUFFERS; @@ -340,7 +340,7 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen, if (MAX2(1, sample_count) != MAX2(1, storage_sample_count)) return false; - if (sample_count > 1 && sample_count != VC5_MAX_SAMPLES) + if (sample_count > 1 && sample_count != V3D_MAX_SAMPLES) return FALSE; if (target >= PIPE_MAX_TEXTURE_TYPES) { diff --git a/src/gallium/drivers/v3d/v3d_screen.h b/src/gallium/drivers/v3d/v3d_screen.h index 6cb33429067..0975da2032f 100644 --- a/src/gallium/drivers/v3d/v3d_screen.h +++ b/src/gallium/drivers/v3d/v3d_screen.h @@ -35,11 +35,11 @@ struct v3d_bo; -#define VC5_MAX_MIP_LEVELS 12 -#define VC5_MAX_TEXTURE_SAMPLERS 32 -#define VC5_MAX_SAMPLES 4 -#define VC5_MAX_DRAW_BUFFERS 4 -#define VC5_MAX_ATTRIBUTES 16 +#define V3D_MAX_MIP_LEVELS 12 +#define V3D_MAX_TEXTURE_SAMPLERS 32 +#define V3D_MAX_SAMPLES 4 +#define V3D_MAX_DRAW_BUFFERS 4 +#define V3D_MAX_ATTRIBUTES 16 /* These are tunable parameters in the HW design, but all the V3D * implementations agree. diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 7ec687031d6..5ad4710876f 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -317,7 +317,7 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d, attr.maximum_index = 0xffffff; #endif } - STATIC_ASSERT(sizeof(vtx->attrs) >= VC5_MAX_ATTRIBUTES * size); + STATIC_ASSERT(sizeof(vtx->attrs) >= V3D_MAX_ATTRIBUTES * size); } if (vtx->num_elements == 0) { @@ -700,7 +700,7 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) rsc->initialized_buffers |= PIPE_CLEAR_STENCIL; } - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { uint32_t bit = PIPE_CLEAR_COLOR0 << i; int blend_rt = v3d->blend->base.independent_blend_enable ? i : 0; @@ -780,7 +780,7 @@ v3d_tlb_clear(struct v3d_job *job, unsigned buffers, buffers &= ~PIPE_CLEAR_DEPTHSTENCIL; } - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { uint32_t bit = PIPE_CLEAR_COLOR0 << i; if (!(buffers & bit)) continue; diff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c index adaf5f6c139..2063f5e1162 100644 --- a/src/gallium/drivers/v3d/v3dx_emit.c +++ b/src/gallium/drivers/v3d/v3dx_emit.c @@ -291,7 +291,7 @@ emit_rt_blend(struct v3d_context *v3d, struct v3d_job *job, if (blend->independent_blend_enable) config.render_target_mask = 1 << rt; else - config.render_target_mask = (1 << VC5_MAX_DRAW_BUFFERS) - 1; + config.render_target_mask = (1 << V3D_MAX_DRAW_BUFFERS) - 1; #else assert(rt == 0); #endif @@ -588,7 +588,7 @@ v3dX(emit_state)(struct pipe_context *pctx) #endif if (blend->base.independent_blend_enable) { - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) emit_rt_blend(v3d, job, &blend->base, i); } else { emit_rt_blend(v3d, job, &blend->base, 0); diff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c index 17750cc75f4..8706ac0fc3f 100644 --- a/src/gallium/drivers/v3d/v3dx_rcl.c +++ b/src/gallium/drivers/v3d/v3dx_rcl.c @@ -207,7 +207,7 @@ v3d_rcl_emit_loads(struct v3d_job *job, struct v3d_cl *cl) { uint32_t loads_pending = job->load; - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { uint32_t bit = PIPE_CLEAR_COLOR0 << i; if (!(loads_pending & bit)) continue; @@ -305,7 +305,7 @@ v3d_rcl_emit_stores(struct v3d_job *job, struct v3d_cl *cl) * perspective. Non-MSAA surfaces will use * STORE_MULTI_SAMPLE_RESOLVED_TILE_COLOR_BUFFER_EXTENDED. */ - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { uint32_t bit = PIPE_CLEAR_COLOR0 << i; if (!(job->store & bit)) continue; @@ -507,7 +507,7 @@ v3dX(emit_rcl)(struct v3d_job *job) v3d_job_add_bo(job, job->rcl.bo); int nr_cbufs = 0; - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { if (job->cbufs[i]) nr_cbufs = i + 1; } diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index 5377f6173c3..b66569c25e7 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -78,7 +78,7 @@ static void v3d_set_sample_mask(struct pipe_context *pctx, unsigned sample_mask) { struct v3d_context *v3d = v3d_context(pctx); - v3d->sample_mask = sample_mask & ((1 << VC5_MAX_SAMPLES) - 1); + v3d->sample_mask = sample_mask & ((1 << V3D_MAX_SAMPLES) - 1); v3d->dirty |= VC5_DIRTY_SAMPLE_STATE; } @@ -131,7 +131,7 @@ v3d_create_blend_state(struct pipe_context *pctx, so->base = *cso; if (cso->independent_blend_enable) { - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) { so->blend_enables |= cso->rt[i].blend_enable << i; /* V3D 4.x is when we got independent blend enables. */ @@ -140,7 +140,7 @@ v3d_create_blend_state(struct pipe_context *pctx, } } else { if (cso->rt[0].blend_enable) - so->blend_enables = (1 << VC5_MAX_DRAW_BUFFERS) - 1; + so->blend_enables = (1 << V3D_MAX_DRAW_BUFFERS) - 1; } return so; @@ -407,10 +407,10 @@ v3d_vertex_state_create(struct pipe_context *pctx, unsigned num_elements, */ uint32_t *attrs; u_upload_alloc(v3d->state_uploader, 0, - VC5_MAX_ATTRIBUTES * 4 * sizeof(float), 16, + V3D_MAX_ATTRIBUTES * 4 * sizeof(float), 16, &so->defaults_offset, &so->defaults, (void **)&attrs); - for (int i = 0; i < VC5_MAX_ATTRIBUTES; i++) { + for (int i = 0; i < V3D_MAX_ATTRIBUTES; i++) { attrs[i * 4 + 0] = 0; attrs[i * 4 + 1] = 0; attrs[i * 4 + 2] = 0; |