freedreno/a6xx: Hide 10_10_10_2 for opencl
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

The alpha channel seems to be internally returned as f16 (up-converted
to f32 is that is the dest type of the sam instruction).  This expresses
1/3 and 2/3 with less precision than cl cts expects (f32).

This may be a test bug.  But the format is not required.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40028>
This commit is contained in:
Rob Clark 2026-02-21 06:43:29 -08:00 committed by Marge Bot
parent d487358527
commit 0632161956

View file

@ -41,6 +41,18 @@ valid_sample_count(unsigned sample_count, bool is_suboptimal)
}
}
static bool
is_cl_supported(const struct fd_dev_info *info, enum pipe_format format)
{
if (info->chip >= A8XX) {
unsigned b = util_format_get_component_bits(
format, UTIL_FORMAT_COLORSPACE_RGB, PIPE_SWIZZLE_W);
if (b == 2)
return false;
}
return true;
}
static bool
fd6_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
@ -54,7 +66,12 @@ fd6_screen_is_format_supported(struct pipe_screen *pscreen,
unsigned retval = 0;
usage &= ~PIPE_BIND_SAMPLER_VIEW_SUBOPTIMAL;
usage &= ~PIPE_BIND_OPENCL;
if (usage & PIPE_BIND_OPENCL) {
if (!is_cl_supported(screen->info, format))
return false;
usage &= ~PIPE_BIND_OPENCL;
}
if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
!valid_sample_count(sample_count, is_suboptimal)) {