summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2013-11-07 21:48:34 +0100
committerFredrik Höglund <[email protected]>2013-11-07 23:51:24 +0100
commitbfc28e4affa1be012551a399f8936e0be5957b4d (patch)
treee7ddd6f473ef507a51985b3b64b343057440b281 /src/mesa
parentfe9284a7bfde59c450c49e6c8d58be82907e13a4 (diff)
st/mesa: Add support for ARB_vertex_type_10f_11f_11f_rev
Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_array.c11
-rw-r--r--src/mesa/state_tracker/st_extensions.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c
index 87a0a17f1b9..76a94bcf876 100644
--- a/src/mesa/state_tracker/st_atom_array.c
+++ b/src/mesa/state_tracker/st_atom_array.c
@@ -214,7 +214,8 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
assert((type >= GL_BYTE && type <= GL_DOUBLE) ||
type == GL_FIXED || type == GL_HALF_FLOAT ||
type == GL_INT_2_10_10_10_REV ||
- type == GL_UNSIGNED_INT_2_10_10_10_REV);
+ type == GL_UNSIGNED_INT_2_10_10_10_REV ||
+ type == GL_UNSIGNED_INT_10F_11F_11F_REV);
assert(size >= 1);
assert(size <= 4);
assert(format == GL_RGBA || format == GL_BGRA);
@@ -251,6 +252,14 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
}
}
+ if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) {
+ assert(size == 3);
+ assert(!integer);
+ assert(format == GL_RGBA);
+
+ return PIPE_FORMAT_R11G11B10_FLOAT;
+ }
+
if (format == GL_BGRA) {
/* this is an odd-ball case */
assert(type == GL_UNSIGNED_BYTE);
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 97c5d55e1b1..e8d0902d96f 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -507,6 +507,8 @@ void st_init_extensions(struct st_context *st)
PIPE_FORMAT_B10G10R10A2_USCALED,
PIPE_FORMAT_R10G10B10A2_SSCALED,
PIPE_FORMAT_B10G10R10A2_SSCALED } },
+ { { o(ARB_vertex_type_10f_11f_11f_rev) },
+ { PIPE_FORMAT_R11G11B10_FLOAT } },
};
static const struct st_extension_format_mapping tbo_rgb32[] = {