mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
freedreno/a6xx: Hide 10_10_10_2 for opencl
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:
parent
d487358527
commit
0632161956
1 changed files with 18 additions and 1 deletions
|
|
@ -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
|
static bool
|
||||||
fd6_screen_is_format_supported(struct pipe_screen *pscreen,
|
fd6_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||||
enum pipe_format format,
|
enum pipe_format format,
|
||||||
|
|
@ -54,7 +66,12 @@ fd6_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||||
unsigned retval = 0;
|
unsigned retval = 0;
|
||||||
|
|
||||||
usage &= ~PIPE_BIND_SAMPLER_VIEW_SUBOPTIMAL;
|
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) ||
|
if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
|
||||||
!valid_sample_count(sample_count, is_suboptimal)) {
|
!valid_sample_count(sample_count, is_suboptimal)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue