mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
ac/nir/ngg: fix clip dist culling mask uninitialized
Fixes:f75452918b("ac/nir/ngg: support clipdist culling") Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20691> (cherry picked from commitd798214c7b)
This commit is contained in:
parent
cf18e9d388
commit
47557044cb
2 changed files with 6 additions and 3 deletions
|
|
@ -130,7 +130,7 @@
|
|||
"description": "ac/nir/ngg: fix clip dist culling mask uninitialized",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "f75452918b27690f9c7a80f3f049483f7dec14fb"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1391,12 +1391,17 @@ add_deferred_attribute_culling(nir_builder *b, nir_cf_list *original_extracted_c
|
|||
nir_local_variable_create(impl, glsl_uint_type(), "repacked_arg_3"),
|
||||
};
|
||||
|
||||
b->cursor = nir_before_cf_list(&impl->body);
|
||||
|
||||
if (nogs_state->options->clipdist_enable_mask ||
|
||||
nogs_state->options->user_clip_plane_enable_mask) {
|
||||
nogs_state->clip_vertex_var =
|
||||
nir_local_variable_create(impl, glsl_vec4_type(), "clip_vertex");
|
||||
nogs_state->clipdist_neg_mask_var =
|
||||
nir_local_variable_create(impl, glsl_uint8_t_type(), "clipdist_neg_mask");
|
||||
|
||||
/* init mask to 0 */
|
||||
nir_store_var(b, nogs_state->clipdist_neg_mask_var, nir_imm_intN_t(b, 0, 8), 1);
|
||||
}
|
||||
|
||||
/* Top part of the culling shader (aka. position shader part)
|
||||
|
|
@ -1406,8 +1411,6 @@ add_deferred_attribute_culling(nir_builder *b, nir_cf_list *original_extracted_c
|
|||
* The position output is stored into a temporary variable, and reloaded later.
|
||||
*/
|
||||
|
||||
b->cursor = nir_before_cf_list(&impl->body);
|
||||
|
||||
nir_ssa_def *es_thread = has_input_vertex(b);
|
||||
nir_if *if_es_thread = nir_push_if(b, es_thread);
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue