IRIS_DIRTY_MULTISAMPLE = (1ull << 13),
IRIS_DIRTY_VERTEX_BUFFERS = (1ull << 14),
IRIS_DIRTY_SAMPLE_MASK = (1ull << 15),
+ IRIS_DIRTY_SAMPLER_STATES_VS = (1ull << 16),
+ IRIS_DIRTY_SAMPLER_STATES_TCS = (1ull << 17),
+ IRIS_DIRTY_SAMPLER_STATES_TES = (1ull << 18),
+ IRIS_DIRTY_SAMPLER_STATES_GS = (1ull << 19),
+ IRIS_DIRTY_SAMPLER_STATES_PS = (1ull << 20),
+ IRIS_DIRTY_SAMPLER_STATES_CS = (1ull << 21),
};
struct iris_depth_stencil_alpha_state;
for (int i = 0; i < count; i++) {
ice->state.samplers[stage][start + i] = states[i];
}
+
+ ice->state.dirty |= IRIS_DIRTY_SAMPLER_STATES_VS << stage;
}
struct iris_sampler_view {
}
}
+ for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) {
+ if (!(dirty & (IRIS_DIRTY_SAMPLER_STATES_VS << stage)))
+ continue;
+
+ // XXX: get sampler count from shader; don't emit them all...
+ const int count = IRIS_MAX_TEXTURE_SAMPLERS;
+
+ uint32_t offset;
+ uint32_t *map = iris_alloc_state(batch,
+ count * 4 * GENX(SAMPLER_STATE_length),
+ 32, &offset);
+
+ for (int i = 0; i < count; i++) {
+ memcpy(map, ice->state.samplers[stage][i]->sampler_state,
+ 4 * GENX(SAMPLER_STATE_length));
+ map += GENX(SAMPLER_STATE_length);
+ }
+
+ iris_emit_cmd(batch, GENX(3DSTATE_SAMPLER_STATE_POINTERS_VS), ptr) {
+ ptr._3DCommandSubOpcode = 43 + stage;
+ ptr.PointertoVSSamplerState = offset;
+ }
+ }
+
if (1) {
iris_emit_cmd(batch, GENX(3DSTATE_VF_TOPOLOGY), topo) {
topo.PrimitiveTopologyType =
3DSTATE_BINDING_TABLE_POINTERS_*
-> TODO
- 3DSTATE_SAMPLER_STATE_POINTERS_*
- -> TODO
-
3DSTATE_VS
3DSTATE_HS
3DSTATE_TE