diff options
author | Tomeu Vizoso <[email protected]> | 2018-06-22 15:04:04 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2018-07-18 14:52:35 +0100 |
commit | 3f7c2148b049037d307096993fa5934d7c0b83d8 (patch) | |
tree | 6af42920653856af600ed0bd4a04428a67a3605f /src/compiler | |
parent | e45ba51ea451c5ce580dc248e932e5b6324c0bbc (diff) |
mesa: handle a bunch of formats in IMPLEMENTATION_COLOR_READ_*
Virgl could save a lot of work converting buffers in the host side
between formats if Mesa supported a bunch of other formats when reading
pixels.
This commit adds cases to handle specific formats so that the values
reported by the two calls match more closely the underlying native
formats.
In GLES is important that IMPLEMENTATION_COLOR_READ_* return the native
format and data type because the spec only allows reading with those,
besides GL_RGBA or GL_RGBA_INTEGER.
Additionally, because virgl currently doesn't implement such
conversions, this commit fixes several tests in
dEQP-GLES3.functional.fbo.color.clear.*, when using virgl in the guest
side.
The logic is based on knowledge that is shared with
_mesa_format_matches_format_and_type() but we cannot assert that the
results match as we don't have all the starting information at both
points. So leave the assert out and hope CI comes soon to save us all.
v2: * Let R10G10B10A2_UINT fall back to GL_RGBA_INTEGER (Eric Anholt)
* Assert with _mesa_format_matches_format_and_type (Eric Anholt)
v3: * Remove the assert, as it won't be reliable (Eric Anholt)
v4: * Use _mesa_is_format_integer in the fallback (Eric Anholt)
v5: * Remove superfluous call to
_mesa_uncompressed_format_to_type_and_comps (Eric Anholt)
Reviewed-by: Gurchetan Singh <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Tomeu Vizoso <[email protected]>
Signed-off-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src/compiler')
0 files changed, 0 insertions, 0 deletions