diff options
author | Dave Airlie <[email protected]> | 2011-11-27 16:23:56 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-11-28 09:40:53 +0000 |
commit | 9f9c8592e692f1c682779f39675be0f3857cae9d (patch) | |
tree | 70f3d165f1ca250388b676b3f687e97f59d1498c /src | |
parent | f449be660e70aac2aefd2ce84581e137de25520b (diff) |
st/mesa: add ARB_texture_rgb10_a2ui support
Add support to the state tracker format and extension enablement code.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 25a6cdc7572..c741d13f48e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -664,4 +664,10 @@ void st_init_extensions(struct st_context *st) PIPE_BIND_SAMPLER_VIEW)) { ctx->Extensions.ARB_depth_buffer_float = GL_TRUE; } + + if (screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_UINT, + PIPE_TEXTURE_2D, 0, + PIPE_BIND_SAMPLER_VIEW)) + ctx->Extensions.ARB_texture_rgb10_a2ui = GL_TRUE; + } diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index b11245bebea..bc414f442e4 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -457,7 +457,8 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat) return PIPE_FORMAT_R9G9B9E5_FLOAT; case MESA_FORMAT_R11_G11_B10_FLOAT: return PIPE_FORMAT_R11G11B10_FLOAT; - + case MESA_FORMAT_ARGB2101010_UINT: + return PIPE_FORMAT_B10G10R10A2_UINT; default: assert(0); return PIPE_FORMAT_NONE; @@ -782,6 +783,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format) case PIPE_FORMAT_R11G11B10_FLOAT: return MESA_FORMAT_R11_G11_B10_FLOAT; + case PIPE_FORMAT_B10G10R10A2_UINT: + return MESA_FORMAT_ARGB2101010_UINT; default: assert(0); return MESA_FORMAT_NONE; @@ -1471,7 +1474,11 @@ static const struct format_mapping format_map[] = { { { GL_R11F_G11F_B10F, 0 }, { PIPE_FORMAT_R11G11B10_FLOAT, 0 } - } + }, + { + { GL_RGB10_A2UI, 0 }, + { PIPE_FORMAT_B10G10R10A2_UINT, 0 } + }, }; |