mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 16:48:07 +02:00
glsl: inline functions with unsupported return type before converting to nir
glsl_to_nir doesn't expect non-vector/scalar return types in functions. Fixes:7e60d5a501Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3058 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3060 Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Tested-by: Witold Baryluk <witold.baryluk@gmail.com> Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5333> (cherry picked from commit9f1cf0e491)
This commit is contained in:
parent
9ff455439b
commit
134dbf5416
2 changed files with 7 additions and 1 deletions
|
|
@ -373,7 +373,7 @@
|
|||
"description": "glsl: inline functions with unsupported return type before converting to nir",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "7e60d5a501f311fa5e7bca5335adc6013dc1aeb9"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -166,6 +166,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
if (!glsl_type_is_vector_or_scalar(ir->return_type) &&
|
||||
!ir->return_type->is_void()) {
|
||||
unsupported = true;
|
||||
return visit_stop;
|
||||
}
|
||||
|
||||
return visit_continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue