mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 21:00:16 +01:00
rusticl: enable proper fp16 support
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34053>
This commit is contained in:
parent
33fb1eca3e
commit
cf3ec8d3b9
6 changed files with 5 additions and 10 deletions
|
|
@ -1186,7 +1186,6 @@ Rusticl environment variables
|
|||
a comma-separated list of features to enable. Those are disabled by default
|
||||
as they might not be stable enough or break OpenCL conformance.
|
||||
|
||||
- ``fp16`` enables OpenCL half support
|
||||
- ``fp64`` enables OpenCL double support
|
||||
- ``intel`` enables various Intel OpenCL extensions
|
||||
|
||||
|
|
|
|||
|
|
@ -819,7 +819,7 @@ Rusticl extensions that are not part of any OpenCL version:
|
|||
cl_khr_expect_assume in progress (hints are ignored)
|
||||
cl_khr_extended_async_copies not started
|
||||
cl_khr_extended_bit_ops in progress
|
||||
cl_khr_fp16 in progress (llvmpipe, radeonsi, zink, Available with environment variable RUSTICL_FEATURES=fp16)
|
||||
cl_khr_fp16 DONE (asahi, freedreno, llvmpipe, panfrost, radeonsi, zink)
|
||||
cl_khr_gl_depth_images not started
|
||||
cl_khr_gl_msaa_sharing not started
|
||||
cl_khr_gl_sharing DONE (iris, radeonsi, zink)
|
||||
|
|
|
|||
|
|
@ -36,3 +36,4 @@ VK_KHR_load_store_op_none on panvk
|
|||
VK_EXT_load_store_op_none on panvk
|
||||
VK_EXT_scalar_block_layout on radv/gfx6
|
||||
VK_EXT_inline_uniform_block on panvk
|
||||
cl_khr_fp16 on asahi, freedreno, llvmpipe, panfrost, radeonsi and zink
|
||||
|
|
|
|||
|
|
@ -888,10 +888,6 @@ impl Device {
|
|||
}
|
||||
|
||||
pub fn fp16_supported(&self) -> bool {
|
||||
if !Platform::features().fp16 {
|
||||
return false;
|
||||
}
|
||||
|
||||
self.shader_caps().fp16
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ pub struct PlatformDebug {
|
|||
}
|
||||
|
||||
pub struct PlatformFeatures {
|
||||
pub fp16: bool,
|
||||
pub fp64: bool,
|
||||
pub intel: bool,
|
||||
}
|
||||
|
|
@ -96,7 +95,6 @@ static mut PLATFORM_DBG: PlatformDebug = PlatformDebug {
|
|||
validate_spirv: false,
|
||||
};
|
||||
static mut PLATFORM_FEATURES: PlatformFeatures = PlatformFeatures {
|
||||
fp16: false,
|
||||
fp64: false,
|
||||
intel: false,
|
||||
};
|
||||
|
|
@ -134,7 +132,6 @@ fn load_env() {
|
|||
if let Ok(feature_flags) = env::var("RUSTICL_FEATURES") {
|
||||
for flag in feature_flags.split(',') {
|
||||
match flag {
|
||||
"fp16" => features.fp16 = true,
|
||||
"fp64" => features.fp64 = true,
|
||||
"intel" => features.intel = true,
|
||||
"" => (),
|
||||
|
|
|
|||
|
|
@ -518,7 +518,9 @@ impl CLCSpecConstantType for clc_spec_constant_type {
|
|||
Self::CLC_SPEC_CONSTANT_INT32
|
||||
| Self::CLC_SPEC_CONSTANT_UINT32
|
||||
| Self::CLC_SPEC_CONSTANT_FLOAT => 4,
|
||||
Self::CLC_SPEC_CONSTANT_INT16 | Self::CLC_SPEC_CONSTANT_UINT16 => 2,
|
||||
Self::CLC_SPEC_CONSTANT_INT16
|
||||
| Self::CLC_SPEC_CONSTANT_UINT16
|
||||
| Self::CLC_SPEC_CONSTANT_HALF => 2,
|
||||
Self::CLC_SPEC_CONSTANT_INT8
|
||||
| Self::CLC_SPEC_CONSTANT_UINT8
|
||||
| Self::CLC_SPEC_CONSTANT_BOOL => 1,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue