mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 02:40:46 +02:00
clc: support cl_khr_extended_bit_ops
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
This commit is contained in:
parent
1a5b5a883d
commit
cf3b16f7af
2 changed files with 4 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ enum clc_spirv_version {
|
|||
};
|
||||
|
||||
struct clc_optional_features {
|
||||
bool extended_bit_ops;
|
||||
bool fp16;
|
||||
bool fp64;
|
||||
bool int64;
|
||||
|
|
|
|||
|
|
@ -965,6 +965,9 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
|
|||
c->getPreprocessorOpts().addMacroDef("cl_khr_expect_assume=1");
|
||||
|
||||
bool needs_opencl_c_h = false;
|
||||
if (args->features.extended_bit_ops) {
|
||||
c->getPreprocessorOpts().addMacroDef("cl_khr_extended_bit_ops=1");
|
||||
}
|
||||
if (args->features.fp16) {
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_khr_fp16");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue