mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
r600: fix remaining pbo issues
This functionality is working properly on rv770, but some issues remain for the newer r600 gpus. These issues are not the same for cypress and for palm and beyond. As far as palm and beyond is concerned this change is consistent with the radeonsi commit:50c95d0c54"radeonsi: reject some 3-component formats as buffer textures". This is explained in a comment of this other commit. This change assumes that all the real evergreen gpus (before palm) behave like cypress. This change was tested on palm, barts and cayman. Here are the tests fixed: deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16f_cube: fail pass deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16i_cube: fail pass deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16ui_cube: fail pass deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16f_cube_array: fail pass deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16i_cube_array: fail pass deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16ui_cube_array: fail pass This change was also tested on cypress. Here are the tests fixed: deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb565_2d: fail pass deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb565_cube: fail pass deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb5_a1_2d: fail pass deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb5_a1_cube: fail pass deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgba4_2d: fail pass deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgba4_cube: fail pass deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb565_2d: fail pass deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb565_cube: fail pass deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb5_a1_2d: fail pass deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb5_a1_cube: fail pass deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgba4_2d: fail pass deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgba4_cube: fail pass deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb565_cube_array: fail pass deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb5_a1_cube_array: fail pass deqp-gles31/functional/texture/specification/teximage3d_pbo/rgba4_cube_array: fail pass deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgb565_cube_array: fail pass deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgb5_a1_cube_array: fail pass deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgba4_cube_array: fail pass Cc: mesa-stable Signed-off-by: Patrick Lerda <patrick9876@free.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35430> (cherry picked from commitf352491834)
This commit is contained in:
parent
8963e632e1
commit
d33d0efb42
5 changed files with 34 additions and 16 deletions
|
|
@ -1254,7 +1254,7 @@
|
|||
"description": "r600: fix remaining pbo issues",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -259,11 +259,6 @@ dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_repeat_
|
|||
dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_repeat_mirror,Fail
|
||||
dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_repeat_repeat,Fail
|
||||
|
||||
# Weird vertical stripes instead of smooth gradient.
|
||||
dEQP-GLES3.functional.texture.specification.teximage2d_pbo.rgb16f_cube,Fail
|
||||
dEQP-GLES3.functional.texture.specification.teximage2d_pbo.rgb16i_cube,Fail
|
||||
dEQP-GLES3.functional.texture.specification.teximage2d_pbo.rgb16ui_cube,Fail
|
||||
|
||||
# Looks like sub-pixel sampling errors or something.
|
||||
dEQP-GLES3.functional.texture.vertex.2d.filtering.linear_nearest_clamp,Fail
|
||||
dEQP-GLES3.functional.texture.vertex.2d.filtering.linear_nearest_mirror,Fail
|
||||
|
|
@ -717,11 +712,6 @@ dEQP-GLES31.functional.texture.gather.offsets.implementation_offset.2d_array.rgb
|
|||
dEQP-GLES31.functional.texture.gather.offsets.implementation_offset.2d_array.rgba8ui.texture_swizzle.one_red_green_blue,Fail
|
||||
dEQP-GLES31.functional.texture.gather.offsets.implementation_offset.2d_array.rgba8ui.texture_swizzle.zero_one_red_green,Fail
|
||||
|
||||
# Sampled wrong, see other rgb16 failures.
|
||||
dEQP-GLES31.functional.texture.specification.teximage3d_pbo.rgb16f_cube_array,Fail
|
||||
dEQP-GLES31.functional.texture.specification.teximage3d_pbo.rgb16i_cube_array,Fail
|
||||
dEQP-GLES31.functional.texture.specification.teximage3d_pbo.rgb16ui_cube_array,Fail
|
||||
|
||||
shaders@glsl-bug-110796,Fail
|
||||
|
||||
spec@arb_compute_shader@local-id-explosion,Fail
|
||||
|
|
|
|||
|
|
@ -266,7 +266,10 @@ bool evergreen_is_format_supported(struct pipe_screen *screen,
|
|||
|
||||
if (usage & PIPE_BIND_SAMPLER_VIEW) {
|
||||
if (target == PIPE_BUFFER) {
|
||||
if (r600_is_buffer_format_supported(format, false))
|
||||
if (r600_is_buffer_format_supported(format, false,
|
||||
rscreen->b.family >= CHIP_PALM ?
|
||||
R600_PBO_WORKAROUND_PALM_TO_ARUBA :
|
||||
R600_PBO_WORKAROUND_CEDAR_TO_HEMLOCK))
|
||||
retval |= PIPE_BIND_SAMPLER_VIEW;
|
||||
} else {
|
||||
if (r600_is_sampler_format_supported(screen, format))
|
||||
|
|
@ -296,7 +299,10 @@ bool evergreen_is_format_supported(struct pipe_screen *screen,
|
|||
}
|
||||
|
||||
if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
|
||||
r600_is_buffer_format_supported(format, true)) {
|
||||
r600_is_buffer_format_supported(format, true,
|
||||
rscreen->b.family >= CHIP_PALM ?
|
||||
R600_PBO_WORKAROUND_PALM_TO_ARUBA :
|
||||
R600_PBO_WORKAROUND_CEDAR_TO_HEMLOCK)) {
|
||||
retval |= PIPE_BIND_VERTEX_BUFFER;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,9 +84,16 @@ static inline unsigned r600_endian_swap(unsigned size)
|
|||
}
|
||||
}
|
||||
|
||||
enum r600_pbo_workaround {
|
||||
R600_PBO_NO_WORKAROUND_NEEDED,
|
||||
R600_PBO_WORKAROUND_CEDAR_TO_HEMLOCK,
|
||||
R600_PBO_WORKAROUND_PALM_TO_ARUBA,
|
||||
};
|
||||
|
||||
static inline bool
|
||||
r600_is_buffer_format_supported(const enum pipe_format format,
|
||||
const bool for_vbo)
|
||||
const bool for_vbo,
|
||||
const enum r600_pbo_workaround pbo_workaround)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
|
||||
|
|
@ -116,6 +123,21 @@ r600_is_buffer_format_supported(const enum pipe_format format,
|
|||
/* No 8 bit 3 channel formats for TBOs */
|
||||
if (desc->channel[i].size == 8 && desc->nr_channels == 3)
|
||||
return false;
|
||||
|
||||
switch (pbo_workaround) {
|
||||
case R600_PBO_WORKAROUND_PALM_TO_ARUBA:
|
||||
if (desc->channel[i].size == 16 && desc->nr_channels == 3)
|
||||
return false;
|
||||
break;
|
||||
case R600_PBO_WORKAROUND_CEDAR_TO_HEMLOCK:
|
||||
if (format == PIPE_FORMAT_B5G6R5_UNORM ||
|
||||
format == PIPE_FORMAT_A1B5G5R5_UNORM ||
|
||||
format == PIPE_FORMAT_A4B4G4R4_UNORM)
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ bool r600_is_format_supported(struct pipe_screen *screen,
|
|||
|
||||
if (usage & PIPE_BIND_SAMPLER_VIEW) {
|
||||
if (target == PIPE_BUFFER) {
|
||||
if (r600_is_buffer_format_supported(format, false))
|
||||
if (r600_is_buffer_format_supported(format, false, R600_PBO_NO_WORKAROUND_NEEDED))
|
||||
retval |= PIPE_BIND_SAMPLER_VIEW;
|
||||
} else {
|
||||
if (r600_is_sampler_format_supported(screen, format))
|
||||
|
|
@ -222,7 +222,7 @@ bool r600_is_format_supported(struct pipe_screen *screen,
|
|||
}
|
||||
|
||||
if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
|
||||
r600_is_buffer_format_supported(format, true)) {
|
||||
r600_is_buffer_format_supported(format, true, R600_PBO_NO_WORKAROUND_NEEDED)) {
|
||||
retval |= PIPE_BIND_VERTEX_BUFFER;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue