bool writes_primid;
bool writes_viewport_index;
bool writes_layer;
- bool writes_memory; /**< contains stores or atomics to buffers or images */
bool uses_derivatives;
bool uses_bindless_samplers;
bool uses_bindless_images;
LLVMBuildICmp(ctx->ac.builder, LLVMIntULT, gs_next_vertex,
LLVMConstInt(ctx->ac.i32, shader->selector->gs_max_out_vertices, 0), "");
- bool use_kill = !info->writes_memory;
+ bool use_kill = !info->base.writes_memory;
if (use_kill) {
ac_build_kill_if_false(&ctx->ac, can_emit);
} else {
break;
case nir_intrinsic_bindless_image_store:
info->uses_bindless_images = true;
- info->writes_memory = true;
info->num_memory_stores++;
break;
case nir_intrinsic_image_deref_store:
- info->writes_memory = true;
info->num_memory_stores++;
break;
case nir_intrinsic_bindless_image_atomic_add:
case nir_intrinsic_bindless_image_atomic_exchange:
case nir_intrinsic_bindless_image_atomic_comp_swap:
info->uses_bindless_images = true;
- info->writes_memory = true;
info->num_memory_stores++;
break;
case nir_intrinsic_image_deref_atomic_add:
case nir_intrinsic_image_deref_atomic_comp_swap:
case nir_intrinsic_image_deref_atomic_inc_wrap:
case nir_intrinsic_image_deref_atomic_dec_wrap:
- info->writes_memory = true;
info->num_memory_stores++;
break;
case nir_intrinsic_store_ssbo:
case nir_intrinsic_ssbo_atomic_xor:
case nir_intrinsic_ssbo_atomic_exchange:
case nir_intrinsic_ssbo_atomic_comp_swap:
- info->writes_memory = true;
info->num_memory_stores++;
break;
case nir_intrinsic_load_color0:
/* The set of PS invocations is always order invariant,
* except when early Z/S tests are requested. */
- if (sctx->ps_shader.cso && sctx->ps_shader.cso->info.writes_memory &&
+ if (sctx->ps_shader.cso && sctx->ps_shader.cso->info.base.writes_memory &&
sctx->ps_shader.cso->info.base.fs.early_fragment_tests &&
!dsa_order_invariant.pass_set)
return false;
unsigned ps_colormask = si_get_total_colormask(sctx);
ps_disabled = sctx->queued.named.rasterizer->rasterizer_discard ||
- (!ps_colormask && !ps_modifies_zs && !ps->info.writes_memory);
+ (!ps_colormask && !ps_modifies_zs && !ps->info.base.writes_memory);
}
/* Find out which VS outputs aren't used by the PS. */
sel->prim_discard_cs_allowed =
sel->info.stage == MESA_SHADER_VERTEX && !sel->info.uses_bindless_images &&
- !sel->info.uses_bindless_samplers && !sel->info.writes_memory &&
+ !sel->info.uses_bindless_samplers && !sel->info.base.writes_memory &&
!sel->info.writes_viewport_index &&
!sel->info.base.vs.window_space_position && !sel->so.num_outputs;
sscreen->always_use_ngg_culling_tess))) &&
sel->info.writes_position &&
!sel->info.writes_viewport_index && /* cull only against viewport 0 */
- !sel->info.writes_memory && !sel->so.num_outputs &&
+ !sel->info.base.writes_memory && !sel->so.num_outputs &&
(sel->info.stage != MESA_SHADER_VERTEX ||
(!sel->info.base.vs.blit_sgprs_amd &&
!sel->info.base.vs.window_space_position));
/* Cases 3, 4. */
sel->db_shader_control |= S_02880C_DEPTH_BEFORE_SHADER(1) |
S_02880C_Z_ORDER(V_02880C_EARLY_Z_THEN_LATE_Z) |
- S_02880C_EXEC_ON_NOOP(sel->info.writes_memory);
- } else if (sel->info.writes_memory) {
+ S_02880C_EXEC_ON_NOOP(sel->info.base.writes_memory);
+ } else if (sel->info.base.writes_memory) {
/* Case 2. */
sel->db_shader_control |= S_02880C_Z_ORDER(V_02880C_LATE_Z) | S_02880C_EXEC_ON_HIER_FAIL(1);
} else {
si_mark_atom_dirty(sctx, &sctx->atoms.s.cb_render_state);
if (sctx->screen->has_out_of_order_rast &&
- (!old_sel || old_sel->info.writes_memory != sel->info.writes_memory ||
+ (!old_sel || old_sel->info.base.writes_memory != sel->info.base.writes_memory ||
old_sel->info.base.fs.early_fragment_tests !=
sel->info.base.fs.early_fragment_tests))
si_mark_atom_dirty(sctx, &sctx->atoms.s.msaa_config);