rusticl/program: fix CL_PROGRAM_BINARIES for devs with no builds
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10611
Fixes: e028baa177
("rusticl/program: implement clCreateProgramWithBinary")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27633>
This commit is contained in:
@@ -517,7 +517,12 @@ impl Program {
|
||||
for (i, d) in self.devs.iter().enumerate() {
|
||||
let mut ptr = ptrs[i];
|
||||
let info = lock.dev_build(d);
|
||||
let spirv = info.spirv.as_ref().unwrap().to_bin();
|
||||
|
||||
// no spirv means nothing to write
|
||||
let Some(spirv) = info.spirv.as_ref() else {
|
||||
continue;
|
||||
};
|
||||
let spirv = spirv.to_bin();
|
||||
|
||||
unsafe {
|
||||
// 1. binary format version
|
||||
|
Reference in New Issue
Block a user