* happens in the middle of a batch buffer, we need to insert manual
* flushes.
*/
- need_flush = (ilo->dirty & ILO_DIRTY_FRAMEBUFFER);
+ need_flush = (ilo->dirty & ILO_DIRTY_FB);
/* same to SO target changes */
- need_flush |= (ilo->dirty & ILO_DIRTY_STREAM_OUTPUT_TARGETS);
+ need_flush |= (ilo->dirty & ILO_DIRTY_SO);
}
/* make sure there is enough room first */
{
bool success;
- if (ilo->dirty & ILO_DIRTY_STREAM_OUTPUT_TARGETS &&
+ if (ilo->dirty & ILO_DIRTY_SO &&
ilo->so.enabled && !ilo->so.append_bitmask) {
/*
* We keep track of the SVBI in the driver, so that we can restore it
struct gen6_pipeline_session *session)
{
/* 3DSTATE_URB */
- if (DIRTY(VERTEX_ELEMENTS) || DIRTY(VS) || DIRTY(GS)) {
+ if (DIRTY(VE) || DIRTY(VS) || DIRTY(GS)) {
const bool gs_active = (ilo->gs || (ilo->vs &&
ilo_shader_get_kernel_param(ilo->vs, ILO_KERNEL_VS_GEN6_SO)));
int vs_entry_size, gs_entry_size;
struct gen6_pipeline_session *session)
{
/* 3DSTATE_INDEX_BUFFER */
- if (DIRTY(INDEX_BUFFER) || session->primitive_restart_changed ||
+ if (DIRTY(IB) || session->primitive_restart_changed ||
session->batch_bo_changed) {
p->gen6_3DSTATE_INDEX_BUFFER(p->dev,
&ilo->ib, ilo->draw->primitive_restart, p->cp);
}
/* 3DSTATE_VERTEX_BUFFERS */
- if (DIRTY(VERTEX_BUFFERS) || DIRTY(VERTEX_ELEMENTS) ||
- session->batch_bo_changed) {
+ if (DIRTY(VB) || DIRTY(VE) || session->batch_bo_changed) {
p->gen6_3DSTATE_VERTEX_BUFFERS(p->dev,
ilo->vb.states, ilo->vb.enabled_mask, ilo->ve, p->cp);
}
/* 3DSTATE_VERTEX_ELEMENTS */
- if (DIRTY(VERTEX_ELEMENTS) || DIRTY(VS)) {
+ if (DIRTY(VE) || DIRTY(VS)) {
const struct ilo_ve_state *ve = ilo->ve;
bool last_velement_edgeflag = false;
bool prepend_generate_ids = false;
const struct ilo_context *ilo,
struct gen6_pipeline_session *session)
{
- const bool emit_3dstate_vs = (DIRTY(VS) || DIRTY(VERTEX_SAMPLERS) ||
+ const bool emit_3dstate_vs = (DIRTY(VS) || DIRTY(SAMPLER_VS) ||
session->kernel_bo_changed);
const bool emit_3dstate_constant_vs = session->pcb_state_vs_changed;
const struct ilo_context *ilo,
struct gen6_pipeline_session *session)
{
- if (DIRTY(VS) || DIRTY(GS) || DIRTY(STREAM_OUTPUT_TARGETS)) {
+ if (DIRTY(VS) || DIRTY(GS) || DIRTY(SO)) {
const struct pipe_stream_output_info *so_info =
(ilo->gs) ? ilo_shader_get_kernel_so_info(ilo->gs) :
(ilo->vs) ? ilo_shader_get_kernel_so_info(ilo->vs) : NULL;
struct gen6_pipeline_session *session)
{
/* 3DSTATE_CLIP */
- if (DIRTY(RASTERIZER) || DIRTY(FS) ||
- DIRTY(VIEWPORT) || DIRTY(FRAMEBUFFER)) {
+ if (DIRTY(RASTERIZER) || DIRTY(FS) || DIRTY(VIEWPORT) || DIRTY(FB)) {
bool enable_guardband = true;
unsigned i;
struct gen6_pipeline_session *session)
{
/* 3DSTATE_DRAWING_RECTANGLE */
- if (DIRTY(FRAMEBUFFER)) {
+ if (DIRTY(FB)) {
if (p->dev->gen == ILO_GEN(6))
gen6_wa_pipe_control_post_sync(p, false);
p->gen6_3DSTATE_CONSTANT_PS(p->dev, NULL, NULL, 0, p->cp);
/* 3DSTATE_WM */
- if (DIRTY(FS) || DIRTY(FRAGMENT_SAMPLERS) ||
- DIRTY(BLEND) || DIRTY(DEPTH_STENCIL_ALPHA) ||
+ if (DIRTY(FS) || DIRTY(SAMPLER_FS) || DIRTY(BLEND) || DIRTY(DSA) ||
DIRTY(RASTERIZER) || session->kernel_bo_changed) {
const int num_samplers = ilo->sampler[PIPE_SHADER_FRAGMENT].count;
const bool dual_blend = ilo->blend->dual_blend;
struct gen6_pipeline_session *session)
{
/* 3DSTATE_MULTISAMPLE and 3DSTATE_SAMPLE_MASK */
- if (DIRTY(SAMPLE_MASK) || DIRTY(FRAMEBUFFER)) {
+ if (DIRTY(SAMPLE_MASK) || DIRTY(FB)) {
const uint32_t *packed_sample_pos;
packed_sample_pos = (ilo->fb.num_samples > 1) ?
struct gen6_pipeline_session *session)
{
/* 3DSTATE_DEPTH_BUFFER and 3DSTATE_CLEAR_PARAMS */
- if (DIRTY(FRAMEBUFFER) || session->batch_bo_changed) {
+ if (DIRTY(FB) || session->batch_bo_changed) {
const struct ilo_zs_surface *zs;
if (ilo->fb.state.zsbuf) {
struct gen6_pipeline_session *session)
{
/* BLEND_STATE */
- if (DIRTY(BLEND) || DIRTY(FRAMEBUFFER) || DIRTY(DEPTH_STENCIL_ALPHA)) {
+ if (DIRTY(BLEND) || DIRTY(FB) || DIRTY(DSA)) {
p->state.BLEND_STATE = p->gen6_BLEND_STATE(p->dev,
ilo->blend, &ilo->fb, &ilo->dsa->alpha, p->cp);
}
/* COLOR_CALC_STATE */
- if (DIRTY(DEPTH_STENCIL_ALPHA) || DIRTY(STENCIL_REF) || DIRTY(BLEND_COLOR)) {
+ if (DIRTY(DSA) || DIRTY(STENCIL_REF) || DIRTY(BLEND_COLOR)) {
p->state.COLOR_CALC_STATE =
p->gen6_COLOR_CALC_STATE(p->dev, &ilo->stencil_ref,
ilo->dsa->alpha.ref_value, &ilo->blend_color, p->cp);
}
/* DEPTH_STENCIL_STATE */
- if (DIRTY(DEPTH_STENCIL_ALPHA)) {
+ if (DIRTY(DSA)) {
p->state.DEPTH_STENCIL_STATE =
p->gen6_DEPTH_STENCIL_STATE(p->dev, ilo->dsa, p->cp);
struct gen6_pipeline_session *session)
{
/* SURFACE_STATEs for render targets */
- if (DIRTY(FRAMEBUFFER)) {
+ if (DIRTY(FB)) {
const int offset = ILO_WM_DRAW_SURFACE(0);
uint32_t *surface_state = &p->state.wm.SURFACE_STATE[offset];
int i;
return;
/* SURFACE_STATEs for stream output targets */
- if (DIRTY(VS) || DIRTY(GS) || DIRTY(STREAM_OUTPUT_TARGETS)) {
+ if (DIRTY(VS) || DIRTY(GS) || DIRTY(SO)) {
const struct pipe_stream_output_info *so_info =
(ilo->gs) ? ilo_shader_get_kernel_so_info(ilo->gs) :
(ilo->vs) ? ilo_shader_get_kernel_so_info(ilo->vs) : NULL;
/* SURFACE_STATEs for sampler views */
switch (shader_type) {
case PIPE_SHADER_VERTEX:
- if (DIRTY(VERTEX_SAMPLER_VIEWS)) {
+ if (DIRTY(VIEW_VS)) {
offset = ILO_VS_TEXTURE_SURFACE(0);
surface_state = &p->state.vs.SURFACE_STATE[offset];
}
break;
case PIPE_SHADER_FRAGMENT:
- if (DIRTY(FRAGMENT_SAMPLER_VIEWS)) {
+ if (DIRTY(VIEW_FS)) {
offset = ILO_WM_TEXTURE_SURFACE(0);
surface_state = &p->state.wm.SURFACE_STATE[offset];
/* SURFACE_STATEs for constant buffers */
switch (shader_type) {
case PIPE_SHADER_VERTEX:
- if (DIRTY(CONSTANT_BUFFER)) {
+ if (DIRTY(CBUF)) {
offset = ILO_VS_CONST_SURFACE(0);
surface_state = &p->state.vs.SURFACE_STATE[offset];
}
break;
case PIPE_SHADER_FRAGMENT:
- if (DIRTY(CONSTANT_BUFFER)) {
+ if (DIRTY(CBUF)) {
offset = ILO_WM_CONST_SURFACE(0);
surface_state = &p->state.wm.SURFACE_STATE[offset];
/* SAMPLER_BORDER_COLOR_STATE and SAMPLER_STATE */
switch (shader_type) {
case PIPE_SHADER_VERTEX:
- if (DIRTY(VERTEX_SAMPLERS) || DIRTY(VERTEX_SAMPLER_VIEWS)) {
+ if (DIRTY(SAMPLER_VS) || DIRTY(VIEW_VS)) {
sampler_state = &p->state.vs.SAMPLER_STATE;
border_color_state = p->state.vs.SAMPLER_BORDER_COLOR_STATE;
- if (DIRTY(VERTEX_SAMPLERS))
+ if (DIRTY(SAMPLER_VS))
emit_border_color = true;
session->sampler_state_vs_changed = true;
}
break;
case PIPE_SHADER_FRAGMENT:
- if (DIRTY(FRAGMENT_SAMPLERS) || DIRTY(FRAGMENT_SAMPLER_VIEWS)) {
+ if (DIRTY(SAMPLER_FS) || DIRTY(VIEW_FS)) {
sampler_state = &p->state.wm.SAMPLER_STATE;
border_color_state = p->state.wm.SAMPLER_BORDER_COLOR_STATE;
- if (DIRTY(FRAGMENT_SAMPLERS))
+ if (DIRTY(SAMPLER_FS))
emit_border_color = true;
session->sampler_state_fs_changed = true;
struct gen6_pipeline_session *session)
{
/* 3DSTATE_URB_{VS,GS,HS,DS} */
- if (DIRTY(VERTEX_ELEMENTS) || DIRTY(VS)) {
+ if (DIRTY(VE) || DIRTY(VS)) {
/* the first 16KB are reserved for VS and PS PCBs */
const int offset = 16 * 1024;
int vs_entry_size, vs_total_size;
const bool emit_3dstate_sampler_state = session->sampler_state_vs_changed;
/* see gen6_pipeline_vs() */
const bool emit_3dstate_constant_vs = session->pcb_state_vs_changed;
- const bool emit_3dstate_vs = (DIRTY(VS) || DIRTY(VERTEX_SAMPLERS));
+ const bool emit_3dstate_vs = (DIRTY(VS) || DIRTY(SAMPLER_VS));
/* emit depth stall before any of the VS commands */
if (emit_3dstate_binding_table || emit_3dstate_sampler_state ||
gen6_pipeline_update_max_svbi(p, ilo, session);
/* 3DSTATE_SO_BUFFER */
- if ((DIRTY(STREAM_OUTPUT_TARGETS) || dirty_sh ||
- session->batch_bo_changed) && ilo->so.enabled) {
+ if ((DIRTY(SO) || dirty_sh || session->batch_bo_changed) &&
+ ilo->so.enabled) {
int i;
for (i = 0; i < ilo->so.count; i++) {
p->gen7_3DSTATE_SO_DECL_LIST(p->dev, so_info, p->cp);
/* 3DSTATE_STREAMOUT */
- if (DIRTY(STREAM_OUTPUT_TARGETS) || DIRTY(RASTERIZER) || dirty_sh) {
+ if (DIRTY(SO) || DIRTY(RASTERIZER) || dirty_sh) {
const unsigned buffer_mask = (1 << ilo->so.count) - 1;
const int output_count = ilo_shader_get_kernel_param(shader,
ILO_KERNEL_OUTPUT_COUNT);
}
/* 3DSTATE_SF */
- if (DIRTY(RASTERIZER) || DIRTY(FRAMEBUFFER)) {
+ if (DIRTY(RASTERIZER) || DIRTY(FB)) {
gen7_wa_pipe_control_cs_stall(p, true, true);
p->gen7_3DSTATE_SF(p->dev, ilo->rasterizer, ilo->fb.state.zsbuf, p->cp);
}
struct gen6_pipeline_session *session)
{
/* 3DSTATE_WM */
- if (DIRTY(FS) || DIRTY(BLEND) || DIRTY(DEPTH_STENCIL_ALPHA) ||
- DIRTY(RASTERIZER)) {
+ if (DIRTY(FS) || DIRTY(BLEND) || DIRTY(DSA) || DIRTY(RASTERIZER)) {
const bool cc_may_kill = (ilo->dsa->alpha.enabled ||
ilo->blend->alpha_to_coverage);
p->gen6_3DSTATE_CONSTANT_PS(p->dev, NULL, NULL, 0, p->cp);
/* 3DSTATE_PS */
- if (DIRTY(FS) || DIRTY(FRAGMENT_SAMPLERS) ||
- DIRTY(BLEND) || session->kernel_bo_changed) {
+ if (DIRTY(FS) || DIRTY(SAMPLER_FS) || DIRTY(BLEND) ||
+ session->kernel_bo_changed) {
const int num_samplers = ilo->sampler[PIPE_SHADER_FRAGMENT].count;
const bool dual_blend = ilo->blend->dual_blend;
/* XXX what is the best way to know if this workaround is needed? */
{
- const bool emit_3dstate_ps = (DIRTY(FS) ||
- DIRTY(FRAGMENT_SAMPLERS) ||
- DIRTY(BLEND));
+ const bool emit_3dstate_ps =
+ (DIRTY(FS) || DIRTY(SAMPLER_FS) || DIRTY(BLEND));
const bool emit_3dstate_depth_buffer =
- (DIRTY(FRAMEBUFFER) || DIRTY(DEPTH_STENCIL_ALPHA) ||
- session->state_bo_changed);
+ (DIRTY(FB) || DIRTY(DSA) || session->state_bo_changed);
if (emit_3dstate_ps ||
emit_3dstate_depth_buffer ||
}
/* 3DSTATE_DEPTH_BUFFER and 3DSTATE_CLEAR_PARAMS */
- if (DIRTY(FRAMEBUFFER) || session->batch_bo_changed) {
+ if (DIRTY(FB) || session->batch_bo_changed) {
const struct ilo_zs_surface *zs;
if (ilo->fb.state.zsbuf) {
struct gen6_pipeline_session *session)
{
/* 3DSTATE_MULTISAMPLE and 3DSTATE_SAMPLE_MASK */
- if (DIRTY(SAMPLE_MASK) || DIRTY(FRAMEBUFFER)) {
+ if (DIRTY(SAMPLE_MASK) || DIRTY(FB)) {
const uint32_t *packed_sample_pos;
gen7_wa_pipe_control_cs_stall(p, true, true);
shader = ilo_shader_state_create(precompile, PIPE_SHADER_VERTEX, state);
/* states used in ilo_shader_variant_init() */
- shader->info.non_orthogonal_states = ILO_DIRTY_VERTEX_SAMPLER_VIEWS |
+ shader->info.non_orthogonal_states = ILO_DIRTY_VIEW_VS |
ILO_DIRTY_RASTERIZER;
return shader;
shader = ilo_shader_state_create(precompile, PIPE_SHADER_GEOMETRY, state);
/* states used in ilo_shader_variant_init() */
- shader->info.non_orthogonal_states = ILO_DIRTY_GEOMETRY_SAMPLER_VIEWS |
+ shader->info.non_orthogonal_states = ILO_DIRTY_VIEW_GS |
ILO_DIRTY_VS |
ILO_DIRTY_RASTERIZER;
shader = ilo_shader_state_create(precompile, PIPE_SHADER_FRAGMENT, state);
/* states used in ilo_shader_variant_init() */
- shader->info.non_orthogonal_states = ILO_DIRTY_FRAGMENT_SAMPLER_VIEWS |
+ shader->info.non_orthogonal_states = ILO_DIRTY_VIEW_FS |
ILO_DIRTY_RASTERIZER |
- ILO_DIRTY_FRAMEBUFFER;
+ ILO_DIRTY_FB;
return shader;
}
{
int sh;
- if (!(ilo->dirty & ILO_DIRTY_CONSTANT_BUFFER))
+ if (!(ilo->dirty & ILO_DIRTY_CBUF))
return;
/* TODO push constants? */
/* could be negative */
ilo->ib.draw_start_offset -= ilo->draw->start;
- ilo->dirty |= ILO_DIRTY_INDEX_BUFFER;
+ ilo->dirty |= ILO_DIRTY_IB;
}
}
struct ilo_context *ilo = ilo_context(pipe);
bind_samplers(ilo, PIPE_SHADER_FRAGMENT, 0, num_samplers, samplers, true);
- ilo->dirty |= ILO_DIRTY_FRAGMENT_SAMPLERS;
+ ilo->dirty |= ILO_DIRTY_SAMPLER_FS;
}
static void
struct ilo_context *ilo = ilo_context(pipe);
bind_samplers(ilo, PIPE_SHADER_VERTEX, 0, num_samplers, samplers, true);
- ilo->dirty |= ILO_DIRTY_VERTEX_SAMPLERS;
+ ilo->dirty |= ILO_DIRTY_SAMPLER_VS;
}
static void
struct ilo_context *ilo = ilo_context(pipe);
bind_samplers(ilo, PIPE_SHADER_GEOMETRY, 0, num_samplers, samplers, true);
- ilo->dirty |= ILO_DIRTY_GEOMETRY_SAMPLERS;
+ ilo->dirty |= ILO_DIRTY_SAMPLER_GS;
}
static void
bind_samplers(ilo, PIPE_SHADER_COMPUTE,
start_slot, num_samplers, samplers, false);
- ilo->dirty |= ILO_DIRTY_COMPUTE_SAMPLERS;
+ ilo->dirty |= ILO_DIRTY_SAMPLER_CS;
}
static void
ilo->dsa = state;
- ilo->dirty |= ILO_DIRTY_DEPTH_STENCIL_ALPHA;
+ ilo->dirty |= ILO_DIRTY_DSA;
}
static void
ilo->ve = state;
- ilo->dirty |= ILO_DIRTY_VERTEX_ELEMENTS;
+ ilo->dirty |= ILO_DIRTY_VE;
}
static void
ilo->cbuf[shader].enabled_mask &= ~(1 << index);
}
- ilo->dirty |= ILO_DIRTY_CONSTANT_BUFFER;
+ ilo->dirty |= ILO_DIRTY_CBUF;
}
static void
if (!ilo->fb.num_samples)
ilo->fb.num_samples = 1;
- ilo->dirty |= ILO_DIRTY_FRAMEBUFFER;
+ ilo->dirty |= ILO_DIRTY_FB;
}
static void
struct ilo_context *ilo = ilo_context(pipe);
set_sampler_views(ilo, PIPE_SHADER_FRAGMENT, 0, num_views, views, true);
- ilo->dirty |= ILO_DIRTY_FRAGMENT_SAMPLER_VIEWS;
+ ilo->dirty |= ILO_DIRTY_VIEW_FS;
}
static void
struct ilo_context *ilo = ilo_context(pipe);
set_sampler_views(ilo, PIPE_SHADER_VERTEX, 0, num_views, views, true);
- ilo->dirty |= ILO_DIRTY_VERTEX_SAMPLER_VIEWS;
+ ilo->dirty |= ILO_DIRTY_VIEW_VS;
}
static void
struct ilo_context *ilo = ilo_context(pipe);
set_sampler_views(ilo, PIPE_SHADER_GEOMETRY, 0, num_views, views, true);
- ilo->dirty |= ILO_DIRTY_GEOMETRY_SAMPLER_VIEWS;
+ ilo->dirty |= ILO_DIRTY_VIEW_GS;
}
static void
set_sampler_views(ilo, PIPE_SHADER_COMPUTE,
start_slot, num_views, views, false);
- ilo->dirty |= ILO_DIRTY_COMPUTE_SAMPLER_VIEWS;
+ ilo->dirty |= ILO_DIRTY_VIEW_CS;
}
static void
ilo->resource.count = count;
}
- ilo->dirty |= ILO_DIRTY_SHADER_RESOURCES;
+ ilo->dirty |= ILO_DIRTY_RESOURCE;
}
static void
util_set_vertex_buffers_mask(ilo->vb.states,
&ilo->vb.enabled_mask, buffers, start_slot, num_buffers);
- ilo->dirty |= ILO_DIRTY_VERTEX_BUFFERS;
+ ilo->dirty |= ILO_DIRTY_VB;
}
static void
ilo->ib.draw_start_offset = 0;
}
- ilo->dirty |= ILO_DIRTY_INDEX_BUFFER;
+ ilo->dirty |= ILO_DIRTY_IB;
}
static struct pipe_stream_output_target *
ilo->so.enabled = (ilo->so.count > 0);
- ilo->dirty |= ILO_DIRTY_STREAM_OUTPUT_TARGETS;
+ ilo->dirty |= ILO_DIRTY_SO;
}
static void
ilo->cs = state;
- ilo->dirty |= ILO_DIRTY_COMPUTE;
+ ilo->dirty |= ILO_DIRTY_CS;
}
static void
ilo->cs_resource.count = count;
}
- ilo->dirty |= ILO_DIRTY_COMPUTE_RESOURCES;
+ ilo->dirty |= ILO_DIRTY_CS_RESOURCE;
}
static void
const unsigned idx = u_bit_scan(&vb_mask);
if (ilo->vb.states[idx].buffer == res) {
- states |= ILO_DIRTY_VERTEX_BUFFERS;
+ states |= ILO_DIRTY_VB;
break;
}
}
if (ilo->ib.state.buffer == res)
- states |= ILO_DIRTY_INDEX_BUFFER;
+ states |= ILO_DIRTY_IB;
for (i = 0; i < ilo->so.count; i++) {
if (ilo->so.states[i]->buffer == res) {
- states |= ILO_DIRTY_STREAM_OUTPUT_TARGETS;
+ states |= ILO_DIRTY_SO;
break;
}
}
if (view->texture == res) {
static const unsigned view_dirty_bits[PIPE_SHADER_TYPES] = {
- [PIPE_SHADER_VERTEX] = ILO_DIRTY_VERTEX_SAMPLER_VIEWS,
- [PIPE_SHADER_FRAGMENT] = ILO_DIRTY_FRAGMENT_SAMPLER_VIEWS,
- [PIPE_SHADER_GEOMETRY] = ILO_DIRTY_GEOMETRY_SAMPLER_VIEWS,
- [PIPE_SHADER_COMPUTE] = ILO_DIRTY_COMPUTE_SAMPLER_VIEWS,
+ [PIPE_SHADER_VERTEX] = ILO_DIRTY_VIEW_VS,
+ [PIPE_SHADER_FRAGMENT] = ILO_DIRTY_VIEW_FS,
+ [PIPE_SHADER_GEOMETRY] = ILO_DIRTY_VIEW_GS,
+ [PIPE_SHADER_COMPUTE] = ILO_DIRTY_VIEW_CS,
};
states |= view_dirty_bits[sh];
struct ilo_cbuf_cso *cbuf = &ilo->cbuf[sh].cso[i];
if (cbuf->resource == res) {
- states |= ILO_DIRTY_CONSTANT_BUFFER;
+ states |= ILO_DIRTY_CBUF;
break;
}
}
for (i = 0; i < ilo->resource.count; i++) {
if (ilo->resource.states[i]->texture == res) {
- states |= ILO_DIRTY_SHADER_RESOURCES;
+ states |= ILO_DIRTY_RESOURCE;
break;
}
}
if (res->target != PIPE_BUFFER) {
for (i = 0; i < ilo->fb.state.nr_cbufs; i++) {
if (ilo->fb.state.cbufs[i]->texture == res) {
- states |= ILO_DIRTY_FRAMEBUFFER;
+ states |= ILO_DIRTY_FB;
break;
}
}
if (ilo->fb.state.zsbuf && ilo->fb.state.zsbuf->texture == res)
- states |= ILO_DIRTY_FRAMEBUFFER;
+ states |= ILO_DIRTY_FB;
}
for (i = 0; i < ilo->cs_resource.count; i++) {
pipe_surface_reference(&ilo->cs_resource.states[i], NULL);
if (ilo->cs_resource.states[i]->texture == res) {
- states |= ILO_DIRTY_COMPUTE_RESOURCES;
+ states |= ILO_DIRTY_CS_RESOURCE;
break;
}
}
* there are not enough bits.
*/
enum ilo_state {
- ILO_STATE_BLEND,
- ILO_STATE_FRAGMENT_SAMPLERS,
- ILO_STATE_VERTEX_SAMPLERS,
- ILO_STATE_GEOMETRY_SAMPLERS,
- ILO_STATE_COMPUTE_SAMPLERS,
- ILO_STATE_RASTERIZER,
- ILO_STATE_DEPTH_STENCIL_ALPHA,
- ILO_STATE_FS,
+ ILO_STATE_VB,
+ ILO_STATE_VE,
+ ILO_STATE_IB,
ILO_STATE_VS,
ILO_STATE_GS,
- ILO_STATE_VERTEX_ELEMENTS,
- ILO_STATE_BLEND_COLOR,
- ILO_STATE_STENCIL_REF,
- ILO_STATE_SAMPLE_MASK,
+ ILO_STATE_SO,
ILO_STATE_CLIP,
- ILO_STATE_CONSTANT_BUFFER,
- ILO_STATE_FRAMEBUFFER,
- ILO_STATE_POLY_STIPPLE,
- ILO_STATE_SCISSOR,
ILO_STATE_VIEWPORT,
- ILO_STATE_FRAGMENT_SAMPLER_VIEWS,
- ILO_STATE_VERTEX_SAMPLER_VIEWS,
- ILO_STATE_GEOMETRY_SAMPLER_VIEWS,
- ILO_STATE_COMPUTE_SAMPLER_VIEWS,
- ILO_STATE_SHADER_RESOURCES,
- ILO_STATE_VERTEX_BUFFERS,
- ILO_STATE_INDEX_BUFFER,
- ILO_STATE_STREAM_OUTPUT_TARGETS,
- ILO_STATE_COMPUTE,
- ILO_STATE_COMPUTE_RESOURCES,
+ ILO_STATE_SCISSOR,
+ ILO_STATE_RASTERIZER,
+ ILO_STATE_POLY_STIPPLE,
+ ILO_STATE_SAMPLE_MASK,
+ ILO_STATE_FS,
+ ILO_STATE_DSA,
+ ILO_STATE_STENCIL_REF,
+ ILO_STATE_BLEND,
+ ILO_STATE_BLEND_COLOR,
+ ILO_STATE_FB,
+
+ ILO_STATE_SAMPLER_VS,
+ ILO_STATE_SAMPLER_GS,
+ ILO_STATE_SAMPLER_FS,
+ ILO_STATE_SAMPLER_CS,
+ ILO_STATE_VIEW_VS,
+ ILO_STATE_VIEW_GS,
+ ILO_STATE_VIEW_FS,
+ ILO_STATE_VIEW_CS,
+ ILO_STATE_CBUF,
+ ILO_STATE_RESOURCE,
+
+ ILO_STATE_CS,
+ ILO_STATE_CS_RESOURCE,
ILO_STATE_GLOBAL_BINDING,
ILO_STATE_COUNT,
* Dirty flags of the states.
*/
enum ilo_dirty_flags {
- ILO_DIRTY_BLEND = 1 << ILO_STATE_BLEND,
- ILO_DIRTY_FRAGMENT_SAMPLERS = 1 << ILO_STATE_FRAGMENT_SAMPLERS,
- ILO_DIRTY_VERTEX_SAMPLERS = 1 << ILO_STATE_VERTEX_SAMPLERS,
- ILO_DIRTY_GEOMETRY_SAMPLERS = 1 << ILO_STATE_GEOMETRY_SAMPLERS,
- ILO_DIRTY_COMPUTE_SAMPLERS = 1 << ILO_STATE_COMPUTE_SAMPLERS,
- ILO_DIRTY_RASTERIZER = 1 << ILO_STATE_RASTERIZER,
- ILO_DIRTY_DEPTH_STENCIL_ALPHA = 1 << ILO_STATE_DEPTH_STENCIL_ALPHA,
- ILO_DIRTY_FS = 1 << ILO_STATE_FS,
- ILO_DIRTY_VS = 1 << ILO_STATE_VS,
- ILO_DIRTY_GS = 1 << ILO_STATE_GS,
- ILO_DIRTY_VERTEX_ELEMENTS = 1 << ILO_STATE_VERTEX_ELEMENTS,
- ILO_DIRTY_BLEND_COLOR = 1 << ILO_STATE_BLEND_COLOR,
- ILO_DIRTY_STENCIL_REF = 1 << ILO_STATE_STENCIL_REF,
- ILO_DIRTY_SAMPLE_MASK = 1 << ILO_STATE_SAMPLE_MASK,
- ILO_DIRTY_CLIP = 1 << ILO_STATE_CLIP,
- ILO_DIRTY_CONSTANT_BUFFER = 1 << ILO_STATE_CONSTANT_BUFFER,
- ILO_DIRTY_FRAMEBUFFER = 1 << ILO_STATE_FRAMEBUFFER,
- ILO_DIRTY_POLY_STIPPLE = 1 << ILO_STATE_POLY_STIPPLE,
- ILO_DIRTY_SCISSOR = 1 << ILO_STATE_SCISSOR,
- ILO_DIRTY_VIEWPORT = 1 << ILO_STATE_VIEWPORT,
- ILO_DIRTY_FRAGMENT_SAMPLER_VIEWS = 1 << ILO_STATE_FRAGMENT_SAMPLER_VIEWS,
- ILO_DIRTY_VERTEX_SAMPLER_VIEWS = 1 << ILO_STATE_VERTEX_SAMPLER_VIEWS,
- ILO_DIRTY_GEOMETRY_SAMPLER_VIEWS = 1 << ILO_STATE_GEOMETRY_SAMPLER_VIEWS,
- ILO_DIRTY_COMPUTE_SAMPLER_VIEWS = 1 << ILO_STATE_COMPUTE_SAMPLER_VIEWS,
- ILO_DIRTY_SHADER_RESOURCES = 1 << ILO_STATE_SHADER_RESOURCES,
- ILO_DIRTY_VERTEX_BUFFERS = 1 << ILO_STATE_VERTEX_BUFFERS,
- ILO_DIRTY_INDEX_BUFFER = 1 << ILO_STATE_INDEX_BUFFER,
- ILO_DIRTY_STREAM_OUTPUT_TARGETS = 1 << ILO_STATE_STREAM_OUTPUT_TARGETS,
- ILO_DIRTY_COMPUTE = 1 << ILO_STATE_COMPUTE,
- ILO_DIRTY_COMPUTE_RESOURCES = 1 << ILO_STATE_COMPUTE_RESOURCES,
- ILO_DIRTY_GLOBAL_BINDING = 1 << ILO_STATE_GLOBAL_BINDING,
- ILO_DIRTY_ALL = 0xffffffff,
+ ILO_DIRTY_VB = 1 << ILO_STATE_VB,
+ ILO_DIRTY_VE = 1 << ILO_STATE_VE,
+ ILO_DIRTY_IB = 1 << ILO_STATE_IB,
+ ILO_DIRTY_VS = 1 << ILO_STATE_VS,
+ ILO_DIRTY_GS = 1 << ILO_STATE_GS,
+ ILO_DIRTY_SO = 1 << ILO_STATE_SO,
+ ILO_DIRTY_CLIP = 1 << ILO_STATE_CLIP,
+ ILO_DIRTY_VIEWPORT = 1 << ILO_STATE_VIEWPORT,
+ ILO_DIRTY_SCISSOR = 1 << ILO_STATE_SCISSOR,
+ ILO_DIRTY_RASTERIZER = 1 << ILO_STATE_RASTERIZER,
+ ILO_DIRTY_POLY_STIPPLE = 1 << ILO_STATE_POLY_STIPPLE,
+ ILO_DIRTY_SAMPLE_MASK = 1 << ILO_STATE_SAMPLE_MASK,
+ ILO_DIRTY_FS = 1 << ILO_STATE_FS,
+ ILO_DIRTY_DSA = 1 << ILO_STATE_DSA,
+ ILO_DIRTY_STENCIL_REF = 1 << ILO_STATE_STENCIL_REF,
+ ILO_DIRTY_BLEND = 1 << ILO_STATE_BLEND,
+ ILO_DIRTY_BLEND_COLOR = 1 << ILO_STATE_BLEND_COLOR,
+ ILO_DIRTY_FB = 1 << ILO_STATE_FB,
+ ILO_DIRTY_SAMPLER_VS = 1 << ILO_STATE_SAMPLER_VS,
+ ILO_DIRTY_SAMPLER_GS = 1 << ILO_STATE_SAMPLER_GS,
+ ILO_DIRTY_SAMPLER_FS = 1 << ILO_STATE_SAMPLER_FS,
+ ILO_DIRTY_SAMPLER_CS = 1 << ILO_STATE_SAMPLER_CS,
+ ILO_DIRTY_VIEW_VS = 1 << ILO_STATE_VIEW_VS,
+ ILO_DIRTY_VIEW_GS = 1 << ILO_STATE_VIEW_GS,
+ ILO_DIRTY_VIEW_FS = 1 << ILO_STATE_VIEW_FS,
+ ILO_DIRTY_VIEW_CS = 1 << ILO_STATE_VIEW_CS,
+ ILO_DIRTY_CBUF = 1 << ILO_STATE_CBUF,
+ ILO_DIRTY_RESOURCE = 1 << ILO_STATE_RESOURCE,
+ ILO_DIRTY_CS = 1 << ILO_STATE_CS,
+ ILO_DIRTY_CS_RESOURCE = 1 << ILO_STATE_CS_RESOURCE,
+ ILO_DIRTY_GLOBAL_BINDING = 1 << ILO_STATE_GLOBAL_BINDING,
+ ILO_DIRTY_ALL = 0xffffffff,
};
+struct pipe_draw_info;
struct pipe_resource;
struct ilo_context;