wm.LineStippleEnable = line && line->stippledLineEnable;
}
- uint32_t dynamic_wm_states = ANV_CMD_DIRTY_DYNAMIC_COLOR_BLEND_STATE;
-
-#if GFX_VER < 8
- dynamic_wm_states |= ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY;
-#endif
-
- if (dynamic_states & dynamic_wm_states) {
- const struct intel_device_info *devinfo = &pipeline->base.device->info;
- uint32_t *dws = devinfo->ver >= 8 ? pipeline->gfx8.wm : pipeline->gfx7.wm;
- GENX(3DSTATE_WM_pack)(NULL, dws, &wm);
- } else {
- anv_batch_emit(&pipeline->base.batch, GENX(3DSTATE_WM), _wm)
- _wm = wm;
- }
+ const struct intel_device_info *devinfo = &pipeline->base.device->info;
+ uint32_t *dws = devinfo->ver >= 8 ? pipeline->gfx8.wm : pipeline->gfx7.wm;
+ GENX(3DSTATE_WM_pack)(NULL, dws, &wm);
}
static void
struct GENX(3DSTATE_WM) wm = {
GENX(3DSTATE_WM_header),
- .ThreadDispatchEnable = pipeline->force_fragment_thread_dispatch ||
- !anv_cmd_buffer_all_color_write_masked(cmd_buffer),
+ .ThreadDispatchEnable = anv_pipeline_has_stage(pipeline, MESA_SHADER_FRAGMENT) &&
+ (pipeline->force_fragment_thread_dispatch ||
+ !anv_cmd_buffer_all_color_write_masked(cmd_buffer)),
.MultisampleRasterizationMode =
genX(ms_rasterization_mode)(pipeline,
dynamic_raster_mode),
genX(emit_sample_pattern)(&cmd_buffer->batch, d);
if (cmd_buffer->state.gfx.dirty & (ANV_CMD_DIRTY_PIPELINE |
- ANV_CMD_DIRTY_DYNAMIC_COLOR_BLEND_STATE |
- ANV_CMD_DIRTY_DYNAMIC_LOGIC_OP)) {
- const uint8_t color_writes = d->color_writes;
+ ANV_CMD_DIRTY_DYNAMIC_COLOR_BLEND_STATE)) {
/* 3DSTATE_WM in the hope we can avoid spawning fragment shaders
* threads.
*/
struct GENX(3DSTATE_WM) wm = {
GENX(3DSTATE_WM_header),
- .ForceThreadDispatchEnable = (pipeline->force_fragment_thread_dispatch ||
+ .ForceThreadDispatchEnable = anv_pipeline_has_stage(pipeline, MESA_SHADER_FRAGMENT) &&
+ (pipeline->force_fragment_thread_dispatch ||
anv_cmd_buffer_all_color_write_masked(cmd_buffer)) ?
ForceON : 0,
};
GENX(3DSTATE_WM_pack)(NULL, wm_dwords, &wm);
anv_batch_emit_merge(&cmd_buffer->batch, wm_dwords, pipeline->gfx8.wm);
+ }
+
+ if (cmd_buffer->state.gfx.dirty & (ANV_CMD_DIRTY_PIPELINE |
+ ANV_CMD_DIRTY_DYNAMIC_COLOR_BLEND_STATE |
+ ANV_CMD_DIRTY_DYNAMIC_LOGIC_OP)) {
+ const uint8_t color_writes = d->color_writes;
/* 3DSTATE_PS_BLEND to be consistent with the rest of the
* BLEND_STATE_ENTRY.