[Mesa-dev] [PATCH 3/3] mesa/st: expose ARB_texture_rgb10_a2ui if R10G10B10A2_UINT is supported
Marek Olšák
maraeo at gmail.com
Wed Dec 25 11:36:57 PST 2013
On Wed, Dec 25, 2013 at 5:53 PM, Christoph Bumiller
<e0425955 at student.tuwien.ac.at> wrote:
> ---
> src/mesa/state_tracker/st_extensions.c | 4 +++-
> src/mesa/state_tracker/st_format.c | 2 +-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 5e4a3b3..8c49e54 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -419,7 +419,9 @@ void st_init_extensions(struct st_context *st)
> PIPE_FORMAT_R16G16B16A16_FLOAT } },
>
> { { o(ARB_texture_rgb10_a2ui) },
> - { PIPE_FORMAT_B10G10R10A2_UINT } },
> + { PIPE_FORMAT_R10G10B10A2_UINT,
> + PIPE_FORMAT_B10G10R10A2_UINT },
> + GL_TRUE }, /* at least one format must be supported */
>
> { { o(EXT_framebuffer_sRGB) },
> { PIPE_FORMAT_A8B8G8R8_SRGB,
> diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
> index 6acf983..2bb07e7 100644
> --- a/src/mesa/state_tracker/st_format.c
> +++ b/src/mesa/state_tracker/st_format.c
> @@ -813,7 +813,7 @@ static const struct format_mapping format_map[] = {
> },
> {
> { GL_RGB10_A2, 0 },
> - { PIPE_FORMAT_B10G10R10A2_UNORM, DEFAULT_RGBA_FORMATS }
> + { PIPE_FORMAT_R10G10B10A2_UNORM, PIPE_FORMAT_B10G10R10A2_UNORM, DEFAULT_RGBA_FORMATS }
I'm pretty sure you wanted to use UINT. Also, GL_RGB10_A2 is not UINT,
so this hunk is technically correct, but unrelated and may not work
because of this reason:
When adding new formats to format_map, the conversion functions
pipe_format_to_mesa_format and vice versa must be updated and the
corresponding MESA formats must be implemented too.
Marek
More information about the mesa-dev
mailing list