mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-04 00:08:16 +02:00
kk: Fix some missed NIR debug asserts
* `msl_ensure_vertex_point_size_output` is missing some NIR pass logic after being converted to use lowered I/O, and only needs to be called for point primitives. * `nir_separate_merged_clip_cull_io` requires the `compact_arrays` NIR option be enabled for compact clip/cull distance arrays. Reviewed-by: Aitor Camacho <aitor@lunarg.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41741>
This commit is contained in:
parent
3df406633e
commit
37faa2c56f
3 changed files with 5 additions and 3 deletions
|
|
@ -261,9 +261,9 @@ msl_ensure_vertex_point_size_output(nir_shader *nir)
|
|||
.base = 0u, .range = 1u, .write_mask = 0x1, .component = 0u,
|
||||
.src_type = nir_type_float32, .io_semantics = io_semantics);
|
||||
nir->info.outputs_written |= BITFIELD64_BIT(VARYING_SLOT_PSIZ);
|
||||
return nir_progress(true, entrypoint, nir_metadata_control_flow);
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ static const nir_shader_compiler_options kk_nir_options = {
|
|||
.lower_mul_2x32_64 = true,
|
||||
.lower_uadd_carry = true,
|
||||
.lower_usub_borrow = true,
|
||||
.compact_arrays = true,
|
||||
/* Metal does not support double. */
|
||||
.lower_doubles_options = (nir_lower_doubles_options)(~0),
|
||||
.lower_int64_options = nir_lower_ufind_msb64 | nir_lower_subgroup_shuffle64,
|
||||
|
|
|
|||
|
|
@ -503,7 +503,8 @@ kk_lower_nir(struct kk_device *dev, nir_shader *nir,
|
|||
glsl_get_natural_size_align_bytes);
|
||||
|
||||
NIR_PASS(_, nir, msl_ensure_vertex_position_output);
|
||||
NIR_PASS(_, nir, msl_ensure_vertex_point_size_output);
|
||||
if (state->ia->primitive_topology == VK_PRIMITIVE_TOPOLOGY_POINT_LIST)
|
||||
NIR_PASS(_, nir, msl_ensure_vertex_point_size_output);
|
||||
} else if (nir->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
NIR_PASS(_, nir, kk_nir_lower_fs_multiview, state->mv->view_mask);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue