Commit f34b8d36 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

panfrost: Map PIPE_{DXT, RGTC, BPTC} to MALI_BCn

Mali (and Vulkan) uses D3D naming conventions for these formats where
Gallium/Mesa uses OpenGL names, but the formats are equivalent. sRGB is
communicated out-of-band on Mali; otherwise, it appears to be a 1:1
mapping.

On supported devices, this exposes GL_EXT_texture_compression_rgtc and
GL_ARB_texture_compression_bptc, so update features.txt
Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <!5856>
parent 6da405ca
......@@ -52,7 +52,7 @@ GL 3.0, GLSL 1.30 --- all DONE: freedreno, i965, nv50, nvc0, r600, radeonsi, llv
GL_EXT_texture_integer DONE (panfrost, v3d)
GL_EXT_texture_array DONE (panfrost, v3d)
GL_EXT_draw_buffers2 (Per-buffer blend and masks) DONE (panfrost, v3d)
GL_EXT_texture_compression_rgtc DONE ()
GL_EXT_texture_compression_rgtc DONE (panfrost/if SoC supports)
GL_ARB_texture_rg DONE (panfrost, v3d)
GL_EXT_transform_feedback (Transform feedback) DONE (panfrost, v3d)
GL_ARB_vertex_array_object (Vertex array objects) DONE (panfrost, v3d)
......@@ -152,7 +152,7 @@ GL 4.1, GLSL 4.10 --- all DONE: i965/gen7+, nvc0, r600, radeonsi, llvmpipe, virg
GL 4.2, GLSL 4.20 -- all DONE: i965/gen7+, nvc0, r600, radeonsi, llvmpipe, virgl
GL_ARB_texture_compression_bptc DONE (freedreno, i965, softpipe, swr, zink)
GL_ARB_texture_compression_bptc DONE (freedreno, i965, softpipe, swr, zink, panfrost/if SoC supports)
GL_ARB_compressed_texture_pixel_storage DONE (all drivers)
GL_ARB_shader_atomic_counters DONE (freedreno/a5xx+, i965, softpipe, v3d)
GL_ARB_texture_storage DONE (all drivers)
......
......@@ -51,6 +51,25 @@ struct panfrost_format panfrost_pipe_format_table[PIPE_FORMAT_COUNT] = {
[PIPE_FORMAT_ETC2_RGB8A1] = { MALI_ETC2_RGB8A1, _T },
[PIPE_FORMAT_ETC2_SRGB8A1] = { MALI_ETC2_RGB8A1, _T },
[PIPE_FORMAT_DXT1_RGB] = { MALI_BC1_UNORM, _T },
[PIPE_FORMAT_DXT1_RGBA] = { MALI_BC1_UNORM, _T },
[PIPE_FORMAT_DXT1_SRGB] = { MALI_BC1_UNORM, _T },
[PIPE_FORMAT_DXT1_SRGBA] = { MALI_BC1_UNORM, _T },
[PIPE_FORMAT_DXT3_RGBA] = { MALI_BC2_UNORM, _T },
[PIPE_FORMAT_DXT3_SRGBA] = { MALI_BC2_UNORM, _T },
[PIPE_FORMAT_DXT5_RGBA] = { MALI_BC3_UNORM, _T },
[PIPE_FORMAT_DXT5_SRGBA] = { MALI_BC3_UNORM, _T },
[PIPE_FORMAT_RGTC1_UNORM] = { MALI_BC4_UNORM, _T },
[PIPE_FORMAT_RGTC1_SNORM] = { MALI_BC4_SNORM, _T },
[PIPE_FORMAT_RGTC2_UNORM] = { MALI_BC5_UNORM, _T },
[PIPE_FORMAT_RGTC2_SNORM] = { MALI_BC5_SNORM, _T },
[PIPE_FORMAT_BPTC_RGB_FLOAT] = { MALI_BC6H_SF16, _T },
[PIPE_FORMAT_BPTC_RGB_UFLOAT] = { MALI_BC6H_UF16, _T },
[PIPE_FORMAT_BPTC_RGBA_UNORM] = { MALI_BC7_UNORM, _T },
[PIPE_FORMAT_BPTC_SRGBA] = { MALI_BC7_UNORM, _T },
[PIPE_FORMAT_ASTC_4x4] = { MALI_ASTC_2D_HDR, _T },
[PIPE_FORMAT_ASTC_5x4] = { MALI_ASTC_2D_HDR, _T },
[PIPE_FORMAT_ASTC_5x5] = { MALI_ASTC_2D_HDR, _T },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment