From 4287d04e9832196e5fe23c7bc640b0079910ae04 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Sun, 25 Feb 2024 13:04:01 -0600 Subject: [PATCH] nak: Add writes_point_size to nak_shader_info Part-of: --- src/nouveau/compiler/nak.h | 3 +-- src/nouveau/compiler/nak/api.rs | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nouveau/compiler/nak.h b/src/nouveau/compiler/nak.h index db768e14e6c..99cec0754cd 100644 --- a/src/nouveau/compiler/nak.h +++ b/src/nouveau/compiler/nak.h @@ -141,11 +141,10 @@ struct nak_shader_info { struct { bool writes_layer; + bool writes_point_size; uint8_t clip_enable; uint8_t cull_enable; - uint8_t _pad[1]; - struct nak_xfb_info xfb; } vtg; diff --git a/src/nouveau/compiler/nak/api.rs b/src/nouveau/compiler/nak/api.rs index 41888da7021..154e3af4058 100644 --- a/src/nouveau/compiler/nak/api.rs +++ b/src/nouveau/compiler/nak/api.rs @@ -394,15 +394,17 @@ pub extern "C" fn nak_compile_shader( | ShaderStageInfo::Vertex => { let writes_layer = nir.info.outputs_written & (1 << VARYING_SLOT_LAYER) != 0; + let writes_point_size = + nir.info.outputs_written & (1 << VARYING_SLOT_PSIZ) != 0; let num_clip = nir.info.clip_distance_array_size(); let num_cull = nir.info.cull_distance_array_size(); let clip_enable = (1_u32 << num_clip) - 1; let cull_enable = ((1_u32 << num_cull) - 1) << num_clip; nak_shader_info__bindgen_ty_2 { - writes_layer: writes_layer, + writes_layer, + writes_point_size, clip_enable: clip_enable.try_into().unwrap(), cull_enable: cull_enable.try_into().unwrap(), - _pad: Default::default(), xfb: unsafe { nak_xfb_from_nir(nir.xfb_info) }, } }