nak: Header stuff

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
Faith Ekstrand 2023-08-22 10:36:27 -05:00 committed by Marge Bot
parent 80376146ed
commit 481a29a912
2 changed files with 5 additions and 5 deletions

View file

@ -45,7 +45,7 @@ nak_bindings_rs = rust.bindgen(
'--allowlist-type', 'nak_.*',
'--allowlist-type', 'nir_.*',
'--allowlist-type', 'mesa_scope',
'--allowlist-type', 'shader_prim',
'--allowlist-type', 'mesa_prim',
'--allowlist-var', 'nir_.*_infos',
'--allowlist-function', 'nak_.*',
'--allowlist-function', 'nir_.*',

View file

@ -101,10 +101,10 @@ fn encode_hdr_for_nir(nir: &nir_shader, tls_size: u32) -> [u32; 32] {
cw3.set_field(0..24, 0_u32 /* ShaderLocalMemoryCrsSize */);
if nir.info.stage() == MESA_SHADER_GEOMETRY {
let info_gs = unsafe { &nir.info.__bindgen_anon_1.gs };
let output_topology = match u32::from(info_gs.output_primitive) {
SHADER_PRIM_POINTS => 1_u8, /* POINTLIST */
SHADER_PRIM_LINES => 6_u8, /* LINESTRIP */
SHADER_PRIM_TRIANGLES => 6_u8, /* TRIANGLESTRIP */
let output_topology = match info_gs.output_primitive {
MESA_PRIM_POINTS => 1_u8, /* POINTLIST */
MESA_PRIM_LINES => 6_u8, /* LINESTRIP */
MESA_PRIM_TRIANGLES => 6_u8, /* TRIANGLESTRIP */
_ => panic!("Invalid geometry output primitive type"),
};
cw3.set_field(24..28, output_topology);