rusticl/program: add clc_validator_options helper function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27204>
This commit is contained in:
@@ -59,6 +59,13 @@ fn get_disk_cache() -> &'static Option<DiskCache> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn clc_validator_options(dev: &Device) -> clc_validator_options {
|
||||||
|
clc_validator_options {
|
||||||
|
// has to match CL_DEVICE_MAX_PARAMETER_SIZE
|
||||||
|
limit_max_function_arg: dev.param_max_size() as u32,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub enum ProgramSourceType {
|
pub enum ProgramSourceType {
|
||||||
Binary,
|
Binary,
|
||||||
Linked,
|
Linked,
|
||||||
@@ -603,10 +610,7 @@ impl Program {
|
|||||||
|
|
||||||
let (spirv, log) = match &self.src {
|
let (spirv, log) = match &self.src {
|
||||||
ProgramSourceType::Il(spirv) => {
|
ProgramSourceType::Il(spirv) => {
|
||||||
let options = clc_validator_options {
|
let options = clc_validator_options(dev);
|
||||||
// has to match CL_DEVICE_MAX_PARAMETER_SIZE
|
|
||||||
limit_max_function_arg: dev.param_max_size() as u32,
|
|
||||||
};
|
|
||||||
if Platform::dbg().allow_invalid_spirv {
|
if Platform::dbg().allow_invalid_spirv {
|
||||||
(Some(spirv.clone()), String::new())
|
(Some(spirv.clone()), String::new())
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user