mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-07 12:20:28 +01:00
nak: Handle unspecified tess spacing
Reviewed-by: Mary Guillemard <mary@mary.zone> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
This commit is contained in:
parent
f9831e356b
commit
ad6a5a88d1
3 changed files with 9 additions and 5 deletions
|
|
@ -302,7 +302,10 @@ impl ShaderBin {
|
|||
nak_shader_info__bindgen_ty_1 {
|
||||
ts: nak_shader_info__bindgen_ty_1__bindgen_ty_3 {
|
||||
domain: ts_info.domain as u8,
|
||||
spacing: ts_info.common.spacing as u8,
|
||||
spacing: ts_info
|
||||
.common
|
||||
.spacing
|
||||
.map_or(0, |x| x as u8),
|
||||
ccw: ts_info.common.ccw,
|
||||
point_mode: ts_info.common.point_mode,
|
||||
_pad: Default::default(),
|
||||
|
|
|
|||
|
|
@ -25,12 +25,13 @@ fn init_info_from_nir(nak: &nak_compiler, nir: &nir_shader) -> ShaderInfo {
|
|||
let tess_common =
|
||||
|info_tess: &shader_info_tess| TesselationCommonShaderInfo {
|
||||
spacing: match info_tess.spacing() {
|
||||
TESS_SPACING_EQUAL => TessellationSpacing::Integer,
|
||||
TESS_SPACING_UNSPECIFIED => None,
|
||||
TESS_SPACING_EQUAL => Some(TessellationSpacing::Integer),
|
||||
TESS_SPACING_FRACTIONAL_ODD => {
|
||||
TessellationSpacing::FractionalOdd
|
||||
Some(TessellationSpacing::FractionalOdd)
|
||||
}
|
||||
TESS_SPACING_FRACTIONAL_EVEN => {
|
||||
TessellationSpacing::FractionalEven
|
||||
Some(TessellationSpacing::FractionalEven)
|
||||
}
|
||||
_ => panic!("Invalid gl_tess_spacing"),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9149,7 +9149,7 @@ pub enum TessellationSpacing {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub struct TesselationCommonShaderInfo {
|
||||
pub spacing: TessellationSpacing,
|
||||
pub spacing: Option<TessellationSpacing>,
|
||||
pub ccw: bool,
|
||||
pub point_mode: bool,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue