From c0edb9344f0423fa8731ded6f70afd53e9f50936 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 23 Aug 2024 20:39:29 +0200 Subject: [PATCH] rusticl: enable cl_khr_depth_images Part-of: --- docs/features.txt | 2 +- docs/relnotes/new_features.txt | 1 + src/gallium/frontends/rusticl/core/format.rs | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/features.txt b/docs/features.txt index e285a368ed2..7041e7afa50 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -904,7 +904,7 @@ Rusticl OpenCL 2.0 -- all DONE: Extended 2D images creation in progress - CL_ABGR DONE - cl_khr_image2d_from_buffer DONE (iris, llvmpipe) - - cl_khr_depth_images not started + - cl_khr_depth_images DONE - from sRGB images in progress clCreateSamplerWithProperties DONE Non-uniform work-group sizes not started diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index e69de29bb2d..9a6b48db7c3 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -0,0 +1 @@ +cl_khr_depth_images in rusticl \ No newline at end of file diff --git a/src/gallium/frontends/rusticl/core/format.rs b/src/gallium/frontends/rusticl/core/format.rs index 253e7c360ad..34783273878 100644 --- a/src/gallium/frontends/rusticl/core/format.rs +++ b/src/gallium/frontends/rusticl/core/format.rs @@ -183,9 +183,11 @@ cl_format_table!([ // broken // (CL_sRGBx, CL_UNORM_INT8) => pipe_format::PIPE_FORMAT_R8G8B8X8_SRGB, -// broken -// (CL_DEPTH, CL_FLOAT) => pipe_format::PIPE_FORMAT_Z32_FLOAT, -// (CL_DEPTH, CL_UNORM_INT16) => pipe_format::PIPE_FORMAT_Z16_UNORM, + // yes, we use non depth formats for CL_DEPTH, because OpenCL requires normal pixel semantics + // and not implicit depth format semantics (e.g. implicit value clamping). Intel NEO does the + // same. + (CL_DEPTH, CL_FLOAT) => pipe_format::PIPE_FORMAT_R32_FLOAT, + (CL_DEPTH, CL_UNORM_INT16) => pipe_format::PIPE_FORMAT_R16_UNORM, (CL_LUMINANCE, CL_HALF_FLOAT) => pipe_format::PIPE_FORMAT_L16_FLOAT, (CL_LUMINANCE, CL_FLOAT) => pipe_format::PIPE_FORMAT_L32_FLOAT,