mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-03 17:38:25 +02:00
rusticl: more intel compat stuff
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41475>
This commit is contained in:
parent
b618cbb5e9
commit
64eba87a67
2 changed files with 14 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ use crate::core::event::EventSig;
|
|||
use crate::core::format::*;
|
||||
use crate::core::gl::*;
|
||||
use crate::core::memory::*;
|
||||
use crate::core::platform::Platform;
|
||||
use crate::core::queue::*;
|
||||
use crate::rusticl_warn_once;
|
||||
|
||||
|
|
@ -53,6 +54,14 @@ fn validate_mem_flags(flags: cl_mem_flags, validation: MemFlagValidationType) ->
|
|||
| CL_MEM_ALLOW_UNRESTRICTED_SIZE_INTEL,
|
||||
);
|
||||
|
||||
if Platform::features().intel {
|
||||
valid_flags |= cl_bitfield::from(
|
||||
CL_MEM_FORCE_HOST_MEMORY_INTEL
|
||||
| CL_MEM_COMPRESSED_HINT_INTEL
|
||||
| CL_MEM_UNCOMPRESSED_HINT_INTEL,
|
||||
);
|
||||
}
|
||||
|
||||
if validation != MemFlagValidationType::Imported {
|
||||
valid_flags |= cl_bitfield::from(
|
||||
CL_MEM_USE_HOST_PTR
|
||||
|
|
@ -327,6 +336,9 @@ unsafe impl CLInfo<cl_mem_info> for cl_mem {
|
|||
}),
|
||||
CL_MEM_SIZE => v.write::<usize>(mem.size),
|
||||
CL_MEM_TYPE => v.write::<cl_mem_object_type>(mem.mem_type),
|
||||
CL_MEM_USES_COMPRESSION_INTEL if Platform::features().intel => {
|
||||
v.write::<cl_bool>(CL_FALSE)
|
||||
}
|
||||
CL_MEM_USES_SVM_POINTER | CL_MEM_USES_SVM_POINTER_ARM => {
|
||||
v.write::<cl_bool>(mem.is_svm().into())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,6 +325,8 @@ fn prepare_options(options: &str, dev: &Device) -> Vec<CString> {
|
|||
"-cl-denorms-are-zero" => Some("-fdenormal-fp-math=positive-zero"),
|
||||
// We can ignore it as long as we don't support ifp
|
||||
"-cl-no-subgroup-ifp" => None,
|
||||
// This indicates how many registers per thread should be used, we just ignore it.
|
||||
"-cl-intel-256-GRF-per-thread" => None,
|
||||
// Some applications use this argument when they detect Intel hardware.
|
||||
"-cl-intel-greater-than-4GB-buffer-required" => None,
|
||||
// Some applications use this when they detect QC hardware
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue