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;
};
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;
};
}
}
- 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);
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);
*/
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]);
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);
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;
}
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;
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;
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:
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;
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) {
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.
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) {
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;
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;
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
#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);
{
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;
* 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;
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;
}
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;
}
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. */
}
} 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;
*/
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;