BEGIN_NVC0(push, NVC0_COMPUTE(CB_BIND), 1);
PUSH_DATA (push, (15 << 8) | 1);
- nvc0->dirty |= NVC0_NEW_DRIVERCONST;
+ nvc0->dirty_3d |= NVC0_NEW_DRIVERCONST;
}
static void
}
/* Invalidate all 3D constbufs because they are aliased with COMPUTE. */
- nvc0->dirty |= NVC0_NEW_CONSTBUF;
+ nvc0->dirty_3d |= NVC0_NEW_CONSTBUF;
for (s = 0; s < 5; s++) {
nvc0->constbuf_dirty[s] |= nvc0->constbuf_valid[s];
nvc0->state.uniform_buffer_bound[s] = 0;
for (i = 0; i < nvc0->framebuffer.nr_cbufs; ++i) {
if (nvc0->framebuffer.cbufs[i] &&
nvc0->framebuffer.cbufs[i]->texture == res) {
- nvc0->dirty |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_FB);
if (!--ref)
return ref;
if (res->bind & PIPE_BIND_DEPTH_STENCIL) {
if (nvc0->framebuffer.zsbuf &&
nvc0->framebuffer.zsbuf->texture == res) {
- nvc0->dirty |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_FB);
if (!--ref)
return ref;
if (res->target == PIPE_BUFFER) {
for (i = 0; i < nvc0->num_vtxbufs; ++i) {
if (nvc0->vtxbuf[i].buffer == res) {
- nvc0->dirty |= NVC0_NEW_ARRAYS;
+ nvc0->dirty_3d |= NVC0_NEW_ARRAYS;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_VTX);
if (!--ref)
return ref;
}
if (nvc0->idxbuf.buffer == res) {
- nvc0->dirty |= NVC0_NEW_IDXBUF;
+ nvc0->dirty_3d |= NVC0_NEW_IDXBUF;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_IDX);
if (!--ref)
return ref;
if (nvc0->textures[s][i] &&
nvc0->textures[s][i]->texture == res) {
nvc0->textures_dirty[s] |= 1 << i;
- nvc0->dirty |= NVC0_NEW_TEXTURES;
+ nvc0->dirty_3d |= NVC0_NEW_TEXTURES;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TEX(s, i));
if (!--ref)
return ref;
nvc0->dirty_cp |= NVC0_NEW_CP_CONSTBUF;
nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_CB(i));
} else {
- nvc0->dirty |= NVC0_NEW_CONSTBUF;
+ nvc0->dirty_3d |= NVC0_NEW_CONSTBUF;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_CB(s, i));
}
if (!--ref)
nvc0->dirty_cp |= NVC0_NEW_CP_BUFFERS;
nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_BUF);
} else {
- nvc0->dirty |= NVC0_NEW_BUFFERS;
+ nvc0->dirty_3d |= NVC0_NEW_BUFFERS;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_BUF);
}
if (!--ref)
if (!nvc0->tcp_empty)
goto out_err;
/* set the empty tctl prog on next draw in case one is never set */
- nvc0->dirty |= NVC0_NEW_TCTLPROG;
+ nvc0->dirty_3d |= NVC0_NEW_TCTLPROG;
/* Do not bind the COMPUTE driver constbuf at screen initialization because
* CBs are aliased between 3D and COMPUTE, but make sure it will be bound if
const struct nv50_m2mf_rect *src,
uint32_t nblocksx, uint32_t nblocksy);
- uint32_t dirty;
+ uint32_t dirty_3d; /* dirty flags for 3d state */
uint32_t dirty_cp; /* dirty flags for compute state */
struct nvc0_graph_state state;
NVC0_3D_SHADE_MODEL_SMOOTH);
}
- if (fp->mem && !(nvc0->dirty & NVC0_NEW_FRAGPROG)) {
+ if (fp->mem && !(nvc0->dirty_3d & NVC0_NEW_FRAGPROG)) {
return;
}
}
nvc0->state.tfb = tfb;
- if (!(nvc0->dirty & NVC0_NEW_TFB_TARGETS))
+ if (!(nvc0->dirty_3d & NVC0_NEW_TFB_TARGETS))
return;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TFB);
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->blend = hwcso;
- nvc0->dirty |= NVC0_NEW_BLEND;
+ nvc0->dirty_3d |= NVC0_NEW_BLEND;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->rast = hwcso;
- nvc0->dirty |= NVC0_NEW_RASTERIZER;
+ nvc0->dirty_3d |= NVC0_NEW_RASTERIZER;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->zsa = hwcso;
- nvc0->dirty |= NVC0_NEW_ZSA;
+ nvc0->dirty_3d |= NVC0_NEW_ZSA;
}
static void
nvc0->num_samplers[s] = nr;
- nvc0->dirty |= NVC0_NEW_SAMPLERS;
+ nvc0->dirty_3d |= NVC0_NEW_SAMPLERS;
}
static void
nvc0->num_textures[s] = nr;
- nvc0->dirty |= NVC0_NEW_TEXTURES;
+ nvc0->dirty_3d |= NVC0_NEW_TEXTURES;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->vertprog = hwcso;
- nvc0->dirty |= NVC0_NEW_VERTPROG;
+ nvc0->dirty_3d |= NVC0_NEW_VERTPROG;
}
static void *
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->fragprog = hwcso;
- nvc0->dirty |= NVC0_NEW_FRAGPROG;
+ nvc0->dirty_3d |= NVC0_NEW_FRAGPROG;
}
static void *
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->gmtyprog = hwcso;
- nvc0->dirty |= NVC0_NEW_GMTYPROG;
+ nvc0->dirty_3d |= NVC0_NEW_GMTYPROG;
}
static void *
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->tctlprog = hwcso;
- nvc0->dirty |= NVC0_NEW_TCTLPROG;
+ nvc0->dirty_3d |= NVC0_NEW_TCTLPROG;
}
static void *
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->tevlprog = hwcso;
- nvc0->dirty |= NVC0_NEW_TEVLPROG;
+ nvc0->dirty_3d |= NVC0_NEW_TEVLPROG;
}
static void *
if (nvc0->constbuf[s][i].u.buf)
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_CB(s, i));
- nvc0->dirty |= NVC0_NEW_CONSTBUF;
+ nvc0->dirty_3d |= NVC0_NEW_CONSTBUF;
}
nvc0->constbuf_dirty[s] |= 1 << i;
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->blend_colour = *bcol;
- nvc0->dirty |= NVC0_NEW_BLEND_COLOUR;
+ nvc0->dirty_3d |= NVC0_NEW_BLEND_COLOUR;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->stencil_ref = *sr;
- nvc0->dirty |= NVC0_NEW_STENCIL_REF;
+ nvc0->dirty_3d |= NVC0_NEW_STENCIL_REF;
}
static void
memcpy(nvc0->clip.ucp, clip->ucp, sizeof(clip->ucp));
- nvc0->dirty |= NVC0_NEW_CLIP;
+ nvc0->dirty_3d |= NVC0_NEW_CLIP;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->sample_mask = sample_mask;
- nvc0->dirty |= NVC0_NEW_SAMPLE_MASK;
+ nvc0->dirty_3d |= NVC0_NEW_SAMPLE_MASK;
}
static void
if (nvc0->min_samples != min_samples) {
nvc0->min_samples = min_samples;
- nvc0->dirty |= NVC0_NEW_MIN_SAMPLES;
+ nvc0->dirty_3d |= NVC0_NEW_MIN_SAMPLES;
}
}
util_copy_framebuffer_state(&nvc0->framebuffer, fb);
- nvc0->dirty |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->stipple = *stipple;
- nvc0->dirty |= NVC0_NEW_STIPPLE;
+ nvc0->dirty_3d |= NVC0_NEW_STIPPLE;
}
static void
continue;
nvc0->scissors[start_slot + i] = scissor[i];
nvc0->scissors_dirty |= 1 << (start_slot + i);
- nvc0->dirty |= NVC0_NEW_SCISSOR;
+ nvc0->dirty_3d |= NVC0_NEW_SCISSOR;
}
}
continue;
nvc0->viewports[start_slot + i] = vpt[i];
nvc0->viewports_dirty |= 1 << (start_slot + i);
- nvc0->dirty |= NVC0_NEW_VIEWPORT;
+ nvc0->dirty_3d |= NVC0_NEW_VIEWPORT;
}
}
memcpy(nvc0->default_tess_outer, default_tess_outer, 4 * sizeof(float));
memcpy(nvc0->default_tess_inner, default_tess_inner, 2 * sizeof(float));
- nvc0->dirty |= NVC0_NEW_TESSFACTOR;
+ nvc0->dirty_3d |= NVC0_NEW_TESSFACTOR;
}
static void
unsigned i;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_VTX);
- nvc0->dirty |= NVC0_NEW_ARRAYS;
+ nvc0->dirty_3d |= NVC0_NEW_ARRAYS;
util_set_vertex_buffers_count(nvc0->vtxbuf, &nvc0->num_vtxbufs, vb,
start_slot, count);
nvc0->idxbuf.index_size = ib->index_size;
if (ib->buffer) {
nvc0->idxbuf.offset = ib->offset;
- nvc0->dirty |= NVC0_NEW_IDXBUF;
+ nvc0->dirty_3d |= NVC0_NEW_IDXBUF;
} else {
nvc0->idxbuf.user_buffer = ib->user_buffer;
- nvc0->dirty &= ~NVC0_NEW_IDXBUF;
+ nvc0->dirty_3d &= ~NVC0_NEW_IDXBUF;
}
} else {
- nvc0->dirty &= ~NVC0_NEW_IDXBUF;
+ nvc0->dirty_3d &= ~NVC0_NEW_IDXBUF;
pipe_resource_reference(&nvc0->idxbuf.buffer, NULL);
}
}
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->vertex = hwcso;
- nvc0->dirty |= NVC0_NEW_VERTEX;
+ nvc0->dirty_3d |= NVC0_NEW_VERTEX;
}
static struct pipe_stream_output_target *
nvc0->num_tfbbufs = num_targets;
if (nvc0->tfbbuf_dirty)
- nvc0->dirty |= NVC0_NEW_TFB_TARGETS;
+ nvc0->dirty_3d |= NVC0_NEW_TFB_TARGETS;
}
static void
if (s == 5)
nvc0_context(pipe)->dirty_cp |= NVC0_NEW_CP_BUFFERS;
else
- nvc0_context(pipe)->dirty |= NVC0_NEW_BUFFERS;
+ nvc0_context(pipe)->dirty_3d |= NVC0_NEW_BUFFERS;
}
static inline void
int i;
struct nouveau_pushbuf *push = nvc0->base.pushbuf;
- if (!(nvc0->dirty & NVC0_NEW_SCISSOR) &&
+ if (!(nvc0->dirty_3d & NVC0_NEW_SCISSOR) &&
nvc0->rast->pipe.scissor == nvc0->state.scissor)
return;
if (clip_enable && vp->vp.num_ucps < PIPE_MAX_CLIP_PLANES)
nvc0_check_program_ucps(nvc0, vp, clip_enable);
- if (nvc0->dirty & (NVC0_NEW_CLIP | (NVC0_NEW_VERTPROG << stage)))
+ if (nvc0->dirty_3d & (NVC0_NEW_CLIP | (NVC0_NEW_VERTPROG << stage)))
if (vp->vp.num_ucps > 0 && vp->vp.num_ucps <= PIPE_MAX_CLIP_PLANES)
nvc0_upload_uclip_planes(nvc0, stage);
else
ctx_to->state = ctx_to->screen->save_state;
- ctx_to->dirty = ~0;
+ ctx_to->dirty_3d = ~0;
ctx_to->dirty_cp = ~0;
ctx_to->viewports_dirty = ~0;
ctx_to->scissors_dirty = ~0;
ctx_to->state.tfb = NULL;
if (!ctx_to->vertex)
- ctx_to->dirty &= ~(NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS);
+ ctx_to->dirty_3d &= ~(NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS);
if (!ctx_to->idxbuf.buffer)
- ctx_to->dirty &= ~NVC0_NEW_IDXBUF;
+ ctx_to->dirty_3d &= ~NVC0_NEW_IDXBUF;
if (!ctx_to->vertprog)
- ctx_to->dirty &= ~NVC0_NEW_VERTPROG;
+ ctx_to->dirty_3d &= ~NVC0_NEW_VERTPROG;
if (!ctx_to->fragprog)
- ctx_to->dirty &= ~NVC0_NEW_FRAGPROG;
+ ctx_to->dirty_3d &= ~NVC0_NEW_FRAGPROG;
if (!ctx_to->blend)
- ctx_to->dirty &= ~NVC0_NEW_BLEND;
+ ctx_to->dirty_3d &= ~NVC0_NEW_BLEND;
if (!ctx_to->rast)
- ctx_to->dirty &= ~(NVC0_NEW_RASTERIZER | NVC0_NEW_SCISSOR);
+ ctx_to->dirty_3d &= ~(NVC0_NEW_RASTERIZER | NVC0_NEW_SCISSOR);
if (!ctx_to->zsa)
- ctx_to->dirty &= ~NVC0_NEW_ZSA;
+ ctx_to->dirty_3d &= ~NVC0_NEW_ZSA;
ctx_to->screen->cur_ctx = ctx_to;
}
if (nvc0->screen->cur_ctx != nvc0)
nvc0_switch_pipe_context(nvc0);
- state_mask = nvc0->dirty & mask;
+ state_mask = nvc0->dirty_3d & mask;
if (state_mask) {
for (i = 0; i < ARRAY_SIZE(validate_list); ++i) {
if (state_mask & validate->states)
validate->func(nvc0);
}
- nvc0->dirty &= ~state_mask;
+ nvc0->dirty_3d &= ~state_mask;
nvc0_bufctx_fence(nvc0, nvc0->bufctx_3d, false);
}
IMMED_NVC0(push, NVC0_3D(COND_MODE), nvc0->cond_condmode);
- nvc0->dirty |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
}
static void
data, data_size);
}
- nvc0->dirty |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
}
static void
IMMED_NVC0(push, NVC0_3D(COND_MODE), nvc0->cond_condmode);
- nvc0->dirty |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
}
void
struct pipe_sampler_view *texture[2];
struct nv50_tsc_entry *sampler[2];
unsigned min_samples;
- uint32_t dirty;
+ uint32_t dirty_3d;
} saved;
struct nvc0_rasterizer_stateobj rast;
};
nvc0->min_samples = 1;
- ctx->saved.dirty = nvc0->dirty;
+ ctx->saved.dirty_3d = nvc0->dirty_3d;
nvc0->textures_dirty[4] |= 3;
nvc0->samplers_dirty[4] |= 3;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TEX(4, 0));
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TEX(4, 1));
- nvc0->dirty = NVC0_NEW_FRAMEBUFFER | NVC0_NEW_MIN_SAMPLES |
+ nvc0->dirty_3d = NVC0_NEW_FRAMEBUFFER | NVC0_NEW_MIN_SAMPLES |
NVC0_NEW_VERTPROG | NVC0_NEW_FRAGPROG |
NVC0_NEW_TCTLPROG | NVC0_NEW_TEVLPROG | NVC0_NEW_GMTYPROG |
NVC0_NEW_TEXTURES | NVC0_NEW_SAMPLERS;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TEX(4, 1));
nouveau_scratch_done(&nvc0->base);
- nvc0->dirty = blit->saved.dirty |
+ nvc0->dirty_3d = blit->saved.dirty_3d |
(NVC0_NEW_FRAMEBUFFER | NVC0_NEW_SCISSOR | NVC0_NEW_SAMPLE_MASK |
NVC0_NEW_RASTERIZER | NVC0_NEW_ZSA | NVC0_NEW_BLEND |
NVC0_NEW_VIEWPORT |
}
const_vbos = vbo_mode ? 0 : nvc0->constant_vbos;
- update_vertex = (nvc0->dirty & NVC0_NEW_VERTEX) ||
+ update_vertex = (nvc0->dirty_3d & NVC0_NEW_VERTEX) ||
(const_vbos != nvc0->state.constant_vbos) ||
(vbo_mode != nvc0->state.vbo_mode);
info->indexed && (nvc0->vb_elt_limit >= (info->count * 2));
/* Check whether we want to switch vertex-submission mode. */
- if (nvc0->vbo_user && !(nvc0->dirty & (NVC0_NEW_ARRAYS | NVC0_NEW_VERTEX))) {
+ if (nvc0->vbo_user && !(nvc0->dirty_3d & (NVC0_NEW_ARRAYS | NVC0_NEW_VERTEX))) {
if (nvc0->vbo_push_hint != !!nvc0->state.vbo_mode)
if (nvc0->state.vbo_mode != 3)
- nvc0->dirty |= NVC0_NEW_ARRAYS;
+ nvc0->dirty_3d |= NVC0_NEW_ARRAYS;
- if (!(nvc0->dirty & NVC0_NEW_ARRAYS) && nvc0->state.vbo_mode == 0) {
+ if (!(nvc0->dirty_3d & NVC0_NEW_ARRAYS) && nvc0->state.vbo_mode == 0) {
if (nvc0->vertex->shared_slots)
nvc0_update_user_vbufs_shared(nvc0);
else