BEGIN_NVC0(push, NVC0_CP(CB_BIND), 1);
PUSH_DATA (push, (15 << 8) | 1);
- nvc0->dirty_3d |= NVC0_NEW_DRIVERCONST;
+ nvc0->dirty_3d |= NVC0_NEW_3D_DRIVERCONST;
}
static void
}
/* Invalidate all 3D constbufs because they are aliased with COMPUTE. */
- nvc0->dirty_3d |= NVC0_NEW_CONSTBUF;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_ARRAYS;
+ nvc0->dirty_3d |= NVC0_NEW_3D_ARRAYS;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_VTX);
if (!--ref)
return ref;
}
if (nvc0->idxbuf.buffer == res) {
- nvc0->dirty_3d |= NVC0_NEW_IDXBUF;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_TEXTURES;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_CONSTBUF;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_BUFFERS;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_TCTLPROG;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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
* a grid is launched later. */
- nvc0->dirty_cp |= NVC0_NEW_CP_DRIVERCONST;
+ nvc0->dirty_cp |= NVC0_NEW_3D_DRIVERCONST;
/* now that there are no more opportunities for errors, set the current
* context if there isn't already one.
#include "nvc0/nve4_p2mf.xml.h"
#include "nvc0/nvc0_macros.h"
-/* NOTE: must keep NVC0_NEW_...PROG in consecutive bits in this order */
-#define NVC0_NEW_BLEND (1 << 0)
-#define NVC0_NEW_RASTERIZER (1 << 1)
-#define NVC0_NEW_ZSA (1 << 2)
-#define NVC0_NEW_VERTPROG (1 << 3)
-#define NVC0_NEW_TCTLPROG (1 << 4)
-#define NVC0_NEW_TEVLPROG (1 << 5)
-#define NVC0_NEW_GMTYPROG (1 << 6)
-#define NVC0_NEW_FRAGPROG (1 << 7)
-#define NVC0_NEW_BLEND_COLOUR (1 << 8)
-#define NVC0_NEW_STENCIL_REF (1 << 9)
-#define NVC0_NEW_CLIP (1 << 10)
-#define NVC0_NEW_SAMPLE_MASK (1 << 11)
-#define NVC0_NEW_FRAMEBUFFER (1 << 12)
-#define NVC0_NEW_STIPPLE (1 << 13)
-#define NVC0_NEW_SCISSOR (1 << 14)
-#define NVC0_NEW_VIEWPORT (1 << 15)
-#define NVC0_NEW_ARRAYS (1 << 16)
-#define NVC0_NEW_VERTEX (1 << 17)
-#define NVC0_NEW_CONSTBUF (1 << 18)
-#define NVC0_NEW_TEXTURES (1 << 19)
-#define NVC0_NEW_SAMPLERS (1 << 20)
-#define NVC0_NEW_TFB_TARGETS (1 << 21)
-#define NVC0_NEW_IDXBUF (1 << 22)
-#define NVC0_NEW_SURFACES (1 << 23)
-#define NVC0_NEW_MIN_SAMPLES (1 << 24)
-#define NVC0_NEW_TESSFACTOR (1 << 25)
-#define NVC0_NEW_BUFFERS (1 << 26)
-#define NVC0_NEW_DRIVERCONST (1 << 27)
+/* NOTE: must keep NVC0_NEW_3D_...PROG in consecutive bits in this order */
+#define NVC0_NEW_3D_BLEND (1 << 0)
+#define NVC0_NEW_3D_RASTERIZER (1 << 1)
+#define NVC0_NEW_3D_ZSA (1 << 2)
+#define NVC0_NEW_3D_VERTPROG (1 << 3)
+#define NVC0_NEW_3D_TCTLPROG (1 << 4)
+#define NVC0_NEW_3D_TEVLPROG (1 << 5)
+#define NVC0_NEW_3D_GMTYPROG (1 << 6)
+#define NVC0_NEW_3D_FRAGPROG (1 << 7)
+#define NVC0_NEW_3D_BLEND_COLOUR (1 << 8)
+#define NVC0_NEW_3D_STENCIL_REF (1 << 9)
+#define NVC0_NEW_3D_CLIP (1 << 10)
+#define NVC0_NEW_3D_SAMPLE_MASK (1 << 11)
+#define NVC0_NEW_3D_FRAMEBUFFER (1 << 12)
+#define NVC0_NEW_3D_STIPPLE (1 << 13)
+#define NVC0_NEW_3D_SCISSOR (1 << 14)
+#define NVC0_NEW_3D_VIEWPORT (1 << 15)
+#define NVC0_NEW_3D_ARRAYS (1 << 16)
+#define NVC0_NEW_3D_VERTEX (1 << 17)
+#define NVC0_NEW_3D_CONSTBUF (1 << 18)
+#define NVC0_NEW_3D_TEXTURES (1 << 19)
+#define NVC0_NEW_3D_SAMPLERS (1 << 20)
+#define NVC0_NEW_3D_TFB_TARGETS (1 << 21)
+#define NVC0_NEW_3D_IDXBUF (1 << 22)
+#define NVC0_NEW_3D_SURFACES (1 << 23)
+#define NVC0_NEW_3D_MIN_SAMPLES (1 << 24)
+#define NVC0_NEW_3D_TESSFACTOR (1 << 25)
+#define NVC0_NEW_3D_BUFFERS (1 << 26)
+#define NVC0_NEW_3D_DRIVERCONST (1 << 27)
#define NVC0_NEW_CP_PROGRAM (1 << 0)
#define NVC0_NEW_CP_SURFACES (1 << 1)
NVC0_3D_SHADE_MODEL_SMOOTH);
}
- if (fp->mem && !(nvc0->dirty_3d & NVC0_NEW_FRAGPROG)) {
+ if (fp->mem && !(nvc0->dirty_3d & NVC0_NEW_3D_FRAGPROG)) {
return;
}
}
nvc0->state.tfb = tfb;
- if (!(nvc0->dirty_3d & NVC0_NEW_TFB_TARGETS))
+ if (!(nvc0->dirty_3d & NVC0_NEW_3D_TFB_TARGETS))
return;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TFB);
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->blend = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_BLEND;
+ nvc0->dirty_3d |= NVC0_NEW_3D_BLEND;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->rast = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_RASTERIZER;
+ nvc0->dirty_3d |= NVC0_NEW_3D_RASTERIZER;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->zsa = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_ZSA;
+ nvc0->dirty_3d |= NVC0_NEW_3D_ZSA;
}
static void
nvc0->num_samplers[s] = nr;
- nvc0->dirty_3d |= NVC0_NEW_SAMPLERS;
+ nvc0->dirty_3d |= NVC0_NEW_3D_SAMPLERS;
}
static void
nvc0->num_textures[s] = nr;
- nvc0->dirty_3d |= NVC0_NEW_TEXTURES;
+ nvc0->dirty_3d |= NVC0_NEW_3D_TEXTURES;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->vertprog = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_VERTPROG;
+ nvc0->dirty_3d |= NVC0_NEW_3D_VERTPROG;
}
static void *
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->fragprog = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_FRAGPROG;
+ nvc0->dirty_3d |= NVC0_NEW_3D_FRAGPROG;
}
static void *
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->gmtyprog = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_GMTYPROG;
+ nvc0->dirty_3d |= NVC0_NEW_3D_GMTYPROG;
}
static void *
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->tctlprog = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_TCTLPROG;
+ nvc0->dirty_3d |= NVC0_NEW_3D_TCTLPROG;
}
static void *
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->tevlprog = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_TEVLPROG;
+ nvc0->dirty_3d |= NVC0_NEW_3D_TEVLPROG;
}
static void *
if (nvc0->constbuf[s][i].u.buf)
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_CB(s, i));
- nvc0->dirty_3d |= NVC0_NEW_CONSTBUF;
+ nvc0->dirty_3d |= NVC0_NEW_3D_CONSTBUF;
}
nvc0->constbuf_dirty[s] |= 1 << i;
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->blend_colour = *bcol;
- nvc0->dirty_3d |= NVC0_NEW_BLEND_COLOUR;
+ nvc0->dirty_3d |= NVC0_NEW_3D_BLEND_COLOUR;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->stencil_ref = *sr;
- nvc0->dirty_3d |= NVC0_NEW_STENCIL_REF;
+ nvc0->dirty_3d |= NVC0_NEW_3D_STENCIL_REF;
}
static void
memcpy(nvc0->clip.ucp, clip->ucp, sizeof(clip->ucp));
- nvc0->dirty_3d |= NVC0_NEW_CLIP;
+ nvc0->dirty_3d |= NVC0_NEW_3D_CLIP;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->sample_mask = sample_mask;
- nvc0->dirty_3d |= NVC0_NEW_SAMPLE_MASK;
+ nvc0->dirty_3d |= NVC0_NEW_3D_SAMPLE_MASK;
}
static void
if (nvc0->min_samples != min_samples) {
nvc0->min_samples = min_samples;
- nvc0->dirty_3d |= NVC0_NEW_MIN_SAMPLES;
+ nvc0->dirty_3d |= NVC0_NEW_3D_MIN_SAMPLES;
}
}
util_copy_framebuffer_state(&nvc0->framebuffer, fb);
- nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_3D_FRAMEBUFFER;
}
static void
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->stipple = *stipple;
- nvc0->dirty_3d |= NVC0_NEW_STIPPLE;
+ nvc0->dirty_3d |= NVC0_NEW_3D_STIPPLE;
}
static void
continue;
nvc0->scissors[start_slot + i] = scissor[i];
nvc0->scissors_dirty |= 1 << (start_slot + i);
- nvc0->dirty_3d |= NVC0_NEW_SCISSOR;
+ nvc0->dirty_3d |= NVC0_NEW_3D_SCISSOR;
}
}
continue;
nvc0->viewports[start_slot + i] = vpt[i];
nvc0->viewports_dirty |= 1 << (start_slot + i);
- nvc0->dirty_3d |= NVC0_NEW_VIEWPORT;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_TESSFACTOR;
+ nvc0->dirty_3d |= NVC0_NEW_3D_TESSFACTOR;
}
static void
unsigned i;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_VTX);
- nvc0->dirty_3d |= NVC0_NEW_ARRAYS;
+ nvc0->dirty_3d |= NVC0_NEW_3D_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_3d |= NVC0_NEW_IDXBUF;
+ nvc0->dirty_3d |= NVC0_NEW_3D_IDXBUF;
} else {
nvc0->idxbuf.user_buffer = ib->user_buffer;
- nvc0->dirty_3d &= ~NVC0_NEW_IDXBUF;
+ nvc0->dirty_3d &= ~NVC0_NEW_3D_IDXBUF;
}
} else {
- nvc0->dirty_3d &= ~NVC0_NEW_IDXBUF;
+ nvc0->dirty_3d &= ~NVC0_NEW_3D_IDXBUF;
pipe_resource_reference(&nvc0->idxbuf.buffer, NULL);
}
}
struct nvc0_context *nvc0 = nvc0_context(pipe);
nvc0->vertex = hwcso;
- nvc0->dirty_3d |= NVC0_NEW_VERTEX;
+ nvc0->dirty_3d |= NVC0_NEW_3D_VERTEX;
}
static struct pipe_stream_output_target *
nvc0->num_tfbbufs = num_targets;
if (nvc0->tfbbuf_dirty)
- nvc0->dirty_3d |= NVC0_NEW_TFB_TARGETS;
+ nvc0->dirty_3d |= NVC0_NEW_3D_TFB_TARGETS;
}
static void
if (s == 5)
nvc0_context(pipe)->dirty_cp |= NVC0_NEW_CP_BUFFERS;
else
- nvc0_context(pipe)->dirty_3d |= NVC0_NEW_BUFFERS;
+ nvc0_context(pipe)->dirty_3d |= NVC0_NEW_3D_BUFFERS;
}
static inline void
int i;
struct nouveau_pushbuf *push = nvc0->base.pushbuf;
- if (!(nvc0->dirty_3d & NVC0_NEW_SCISSOR) &&
+ if (!(nvc0->dirty_3d & NVC0_NEW_3D_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_3d & (NVC0_NEW_CLIP | (NVC0_NEW_VERTPROG << stage)))
+ if (nvc0->dirty_3d & (NVC0_NEW_3D_CLIP | (NVC0_NEW_3D_VERTPROG << stage)))
if (vp->vp.num_ucps > 0 && vp->vp.num_ucps <= PIPE_MAX_CLIP_PLANES)
nvc0_upload_uclip_planes(nvc0, stage);
ctx_to->state.tfb = NULL;
if (!ctx_to->vertex)
- ctx_to->dirty_3d &= ~(NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS);
+ ctx_to->dirty_3d &= ~(NVC0_NEW_3D_VERTEX | NVC0_NEW_3D_ARRAYS);
if (!ctx_to->idxbuf.buffer)
- ctx_to->dirty_3d &= ~NVC0_NEW_IDXBUF;
+ ctx_to->dirty_3d &= ~NVC0_NEW_3D_IDXBUF;
if (!ctx_to->vertprog)
- ctx_to->dirty_3d &= ~NVC0_NEW_VERTPROG;
+ ctx_to->dirty_3d &= ~NVC0_NEW_3D_VERTPROG;
if (!ctx_to->fragprog)
- ctx_to->dirty_3d &= ~NVC0_NEW_FRAGPROG;
+ ctx_to->dirty_3d &= ~NVC0_NEW_3D_FRAGPROG;
if (!ctx_to->blend)
- ctx_to->dirty_3d &= ~NVC0_NEW_BLEND;
+ ctx_to->dirty_3d &= ~NVC0_NEW_3D_BLEND;
if (!ctx_to->rast)
- ctx_to->dirty_3d &= ~(NVC0_NEW_RASTERIZER | NVC0_NEW_SCISSOR);
+ ctx_to->dirty_3d &= ~(NVC0_NEW_3D_RASTERIZER | NVC0_NEW_3D_SCISSOR);
if (!ctx_to->zsa)
- ctx_to->dirty_3d &= ~NVC0_NEW_ZSA;
+ ctx_to->dirty_3d &= ~NVC0_NEW_3D_ZSA;
ctx_to->screen->cur_ctx = ctx_to;
}
void (*func)(struct nvc0_context *);
uint32_t states;
} validate_list[] = {
- { nvc0_validate_fb, NVC0_NEW_FRAMEBUFFER },
- { nvc0_validate_blend, NVC0_NEW_BLEND },
- { nvc0_validate_zsa, NVC0_NEW_ZSA },
- { nvc0_validate_sample_mask, NVC0_NEW_SAMPLE_MASK },
- { nvc0_validate_rasterizer, NVC0_NEW_RASTERIZER },
- { nvc0_validate_blend_colour, NVC0_NEW_BLEND_COLOUR },
- { nvc0_validate_stencil_ref, NVC0_NEW_STENCIL_REF },
- { nvc0_validate_stipple, NVC0_NEW_STIPPLE },
- { nvc0_validate_scissor, NVC0_NEW_SCISSOR | NVC0_NEW_RASTERIZER },
- { nvc0_validate_viewport, NVC0_NEW_VIEWPORT },
- { nvc0_vertprog_validate, NVC0_NEW_VERTPROG },
- { nvc0_tctlprog_validate, NVC0_NEW_TCTLPROG },
- { nvc0_tevlprog_validate, NVC0_NEW_TEVLPROG },
- { nvc0_validate_tess_state, NVC0_NEW_TESSFACTOR },
- { nvc0_gmtyprog_validate, NVC0_NEW_GMTYPROG },
- { nvc0_fragprog_validate, NVC0_NEW_FRAGPROG | NVC0_NEW_RASTERIZER },
- { nvc0_validate_derived_1, NVC0_NEW_FRAGPROG | NVC0_NEW_ZSA |
- NVC0_NEW_RASTERIZER },
- { nvc0_validate_derived_2, NVC0_NEW_ZSA | NVC0_NEW_FRAMEBUFFER },
- { nvc0_validate_derived_3, NVC0_NEW_BLEND | NVC0_NEW_FRAMEBUFFER },
- { nvc0_validate_clip, NVC0_NEW_CLIP | NVC0_NEW_RASTERIZER |
- NVC0_NEW_VERTPROG |
- NVC0_NEW_TEVLPROG |
- NVC0_NEW_GMTYPROG },
- { nvc0_constbufs_validate, NVC0_NEW_CONSTBUF },
- { nvc0_validate_textures, NVC0_NEW_TEXTURES },
- { nvc0_validate_samplers, NVC0_NEW_SAMPLERS },
- { nve4_set_tex_handles, NVC0_NEW_TEXTURES | NVC0_NEW_SAMPLERS },
- { nvc0_vertex_arrays_validate, NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS },
- { nvc0_validate_surfaces, NVC0_NEW_SURFACES },
- { nvc0_validate_buffers, NVC0_NEW_BUFFERS },
- { nvc0_idxbuf_validate, NVC0_NEW_IDXBUF },
- { nvc0_tfb_validate, NVC0_NEW_TFB_TARGETS | NVC0_NEW_GMTYPROG },
- { nvc0_validate_min_samples, NVC0_NEW_MIN_SAMPLES },
- { nvc0_validate_driverconst, NVC0_NEW_DRIVERCONST },
+ { nvc0_validate_fb, NVC0_NEW_3D_FRAMEBUFFER },
+ { nvc0_validate_blend, NVC0_NEW_3D_BLEND },
+ { nvc0_validate_zsa, NVC0_NEW_3D_ZSA },
+ { nvc0_validate_sample_mask, NVC0_NEW_3D_SAMPLE_MASK },
+ { nvc0_validate_rasterizer, NVC0_NEW_3D_RASTERIZER },
+ { nvc0_validate_blend_colour, NVC0_NEW_3D_BLEND_COLOUR },
+ { nvc0_validate_stencil_ref, NVC0_NEW_3D_STENCIL_REF },
+ { nvc0_validate_stipple, NVC0_NEW_3D_STIPPLE },
+ { nvc0_validate_scissor, NVC0_NEW_3D_SCISSOR | NVC0_NEW_3D_RASTERIZER },
+ { nvc0_validate_viewport, NVC0_NEW_3D_VIEWPORT },
+ { nvc0_vertprog_validate, NVC0_NEW_3D_VERTPROG },
+ { nvc0_tctlprog_validate, NVC0_NEW_3D_TCTLPROG },
+ { nvc0_tevlprog_validate, NVC0_NEW_3D_TEVLPROG },
+ { nvc0_validate_tess_state, NVC0_NEW_3D_TESSFACTOR },
+ { nvc0_gmtyprog_validate, NVC0_NEW_3D_GMTYPROG },
+ { nvc0_fragprog_validate, NVC0_NEW_3D_FRAGPROG | NVC0_NEW_3D_RASTERIZER },
+ { nvc0_validate_derived_1, NVC0_NEW_3D_FRAGPROG | NVC0_NEW_3D_ZSA |
+ NVC0_NEW_3D_RASTERIZER },
+ { nvc0_validate_derived_2, NVC0_NEW_3D_ZSA | NVC0_NEW_3D_FRAMEBUFFER },
+ { nvc0_validate_derived_3, NVC0_NEW_3D_BLEND | NVC0_NEW_3D_FRAMEBUFFER },
+ { nvc0_validate_clip, NVC0_NEW_3D_CLIP | NVC0_NEW_3D_RASTERIZER |
+ NVC0_NEW_3D_VERTPROG |
+ NVC0_NEW_3D_TEVLPROG |
+ NVC0_NEW_3D_GMTYPROG },
+ { nvc0_constbufs_validate, NVC0_NEW_3D_CONSTBUF },
+ { nvc0_validate_textures, NVC0_NEW_3D_TEXTURES },
+ { nvc0_validate_samplers, NVC0_NEW_3D_SAMPLERS },
+ { nve4_set_tex_handles, NVC0_NEW_3D_TEXTURES | NVC0_NEW_3D_SAMPLERS },
+ { nvc0_vertex_arrays_validate, NVC0_NEW_3D_VERTEX | NVC0_NEW_3D_ARRAYS },
+ { nvc0_validate_surfaces, NVC0_NEW_3D_SURFACES },
+ { nvc0_validate_buffers, NVC0_NEW_3D_BUFFERS },
+ { nvc0_idxbuf_validate, NVC0_NEW_3D_IDXBUF },
+ { nvc0_tfb_validate, NVC0_NEW_3D_TFB_TARGETS | NVC0_NEW_3D_GMTYPROG },
+ { nvc0_validate_min_samples, NVC0_NEW_3D_MIN_SAMPLES },
+ { nvc0_validate_driverconst, NVC0_NEW_3D_DRIVERCONST },
};
bool
IMMED_NVC0(push, NVC0_3D(COND_MODE), nvc0->cond_condmode);
- nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_3D_FRAMEBUFFER;
}
static void
data, data_size);
}
- nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_3D_FRAMEBUFFER;
}
static void
IMMED_NVC0(push, NVC0_3D(COND_MODE), nvc0->cond_condmode);
- nvc0->dirty_3d |= NVC0_NEW_FRAMEBUFFER;
+ nvc0->dirty_3d |= NVC0_NEW_3D_FRAMEBUFFER;
}
void
uint32_t mode = 0;
/* don't need NEW_BLEND, COLOR_MASK doesn't affect CLEAR_BUFFERS */
- if (!nvc0_state_validate(nvc0, NVC0_NEW_FRAMEBUFFER))
+ if (!nvc0_state_validate(nvc0, NVC0_NEW_3D_FRAMEBUFFER))
return;
if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) {
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TEX(4, 0));
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TEX(4, 1));
- 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;
+ nvc0->dirty_3d = NVC0_NEW_3D_FRAMEBUFFER | NVC0_NEW_3D_MIN_SAMPLES |
+ NVC0_NEW_3D_VERTPROG | NVC0_NEW_3D_FRAGPROG |
+ NVC0_NEW_3D_TCTLPROG | NVC0_NEW_3D_TEVLPROG | NVC0_NEW_3D_GMTYPROG |
+ NVC0_NEW_3D_TEXTURES | NVC0_NEW_3D_SAMPLERS;
}
static void
nouveau_scratch_done(&nvc0->base);
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 |
- NVC0_NEW_TEXTURES | NVC0_NEW_SAMPLERS |
- NVC0_NEW_VERTPROG | NVC0_NEW_FRAGPROG |
- NVC0_NEW_TCTLPROG | NVC0_NEW_TEVLPROG | NVC0_NEW_GMTYPROG |
- NVC0_NEW_TFB_TARGETS | NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS);
+ (NVC0_NEW_3D_FRAMEBUFFER | NVC0_NEW_3D_SCISSOR | NVC0_NEW_3D_SAMPLE_MASK |
+ NVC0_NEW_3D_RASTERIZER | NVC0_NEW_3D_ZSA | NVC0_NEW_3D_BLEND |
+ NVC0_NEW_3D_VIEWPORT |
+ NVC0_NEW_3D_TEXTURES | NVC0_NEW_3D_SAMPLERS |
+ NVC0_NEW_3D_VERTPROG | NVC0_NEW_3D_FRAGPROG |
+ NVC0_NEW_3D_TCTLPROG | NVC0_NEW_3D_TEVLPROG | NVC0_NEW_3D_GMTYPROG |
+ NVC0_NEW_3D_TFB_TARGETS | NVC0_NEW_3D_VERTEX | NVC0_NEW_3D_ARRAYS);
nvc0->scissors_dirty |= 1;
nvc0->viewports_dirty |= 1;
}
const_vbos = vbo_mode ? 0 : nvc0->constant_vbos;
- update_vertex = (nvc0->dirty_3d & NVC0_NEW_VERTEX) ||
+ update_vertex = (nvc0->dirty_3d & NVC0_NEW_3D_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_3d & (NVC0_NEW_ARRAYS | NVC0_NEW_VERTEX))) {
+ if (nvc0->vbo_user && !(nvc0->dirty_3d & (NVC0_NEW_3D_ARRAYS | NVC0_NEW_3D_VERTEX))) {
if (nvc0->vbo_push_hint != !!nvc0->state.vbo_mode)
if (nvc0->state.vbo_mode != 3)
- nvc0->dirty_3d |= NVC0_NEW_ARRAYS;
+ nvc0->dirty_3d |= NVC0_NEW_3D_ARRAYS;
- if (!(nvc0->dirty_3d & NVC0_NEW_ARRAYS) && nvc0->state.vbo_mode == 0) {
+ if (!(nvc0->dirty_3d & NVC0_NEW_3D_ARRAYS) && nvc0->state.vbo_mode == 0) {
if (nvc0->vertex->shared_slots)
nvc0_update_user_vbufs_shared(nvc0);
else