IRIS_DIRTY_BLEND_STATE = (1ull << 7),
IRIS_DIRTY_RASTER = (1ull << 8),
IRIS_DIRTY_CLIP = (1ull << 9),
+ IRIS_DIRTY_SCISSOR = (1ull << 10),
};
struct iris_depth_stencil_alpha_state;
struct {
uint64_t dirty;
+ unsigned num_scissors;
struct iris_blend_state *cso_blend;
struct iris_rasterizer_state *cso_rast;
struct iris_depth_stencil_alpha_state *cso_zsa;
{
struct iris_context *ice = (struct iris_context *) ctx;
+ ice->state.num_scissors = num_scissors;
+
for (unsigned i = start_slot; i < start_slot + num_scissors; i++) {
ice->state.scissors[i] = *state;
}
iris_batch_emit(batch, cso->sf, sizeof(cso->sf));
}
+ if (dirty & IRIS_DIRTY_SCISSOR) {
+ uint32_t scissor_offset =
+ iris_emit_state(batch, ice->state.scissors,
+ sizeof(struct pipe_scissor_state) *
+ ice->state.num_scissors, 32);
+
+ iris_emit_cmd(batch, GENX(3DSTATE_SCISSOR_STATE_POINTERS), ptr) {
+ ptr.ScissorRectPointer = scissor_offset;
+ }
+ }
+
#if 0
l3 configuration
-> pipe_viewport_state for matrix elements, guardband is calculated
from those. can calculate screen space from matrix apparently...
- 3DSTATE_SCISSOR_STATE_POINTERS - SCISSOR_RECT
- -> from ice->state.scissors
-
3DSTATE_PUSH_CONSTANT_ALLOC_*
3DSTATE_URB_*
-> TODO