diff options
author | marha <marha@users.sourceforge.net> | 2011-09-06 16:00:59 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-06 16:00:59 +0200 |
commit | 788b9f4552ce114eb6d433bcb39e2de4acebef5d (patch) | |
tree | c9c1dd2dfbddd353202e10dc5deb294bc6e528d1 /mesalib/src/mesa/state_tracker | |
parent | aacd7c23fef5e89f26b4d23964ac8ebe93fd9cbe (diff) | |
parent | 53da0b7e7c183ea15692234332b3e337b3fb0cc0 (diff) | |
download | vcxsrv-788b9f4552ce114eb6d433bcb39e2de4acebef5d.tar.gz vcxsrv-788b9f4552ce114eb6d433bcb39e2de4acebef5d.tar.bz2 vcxsrv-788b9f4552ce114eb6d433bcb39e2de4acebef5d.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/docs/GL3.txt
mesalib/src/mapi/glapi/gen/Makefile
mesalib/src/mapi/glapi/gen/gl_API.xml
mesalib/src/mapi/glapi/glapi_mapi_tmp.h
mesalib/src/mapi/glapi/glapi_sparc.S
mesalib/src/mapi/glapi/glapi_x86-64.S
mesalib/src/mapi/glapi/glapi_x86.S
mesalib/src/mapi/glapi/glapitable.h
mesalib/src/mapi/glapi/glapitemp.h
mesalib/src/mapi/glapi/glprocs.h
mesalib/src/mesa/main/dd.h
mesalib/src/mesa/main/enums.c
mesalib/src/mesa/main/mtypes.h
mesalib/src/mesa/main/remap_helper.h
mesalib/src/mesa/main/uniforms.c
mesalib/src/mesa/state_tracker/st_draw.c
mesalib/src/mesa/state_tracker/st_extensions.c
mesalib/src/mesa/vbo/vbo_attrib_tmp.h
mesalib/src/mesa/vbo/vbo_save_api.c
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 35 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 28 |
2 files changed, 62 insertions, 1 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index 3b1fab04e..33e265f49 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -187,11 +187,44 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format, GLboolean normalized)
{
assert((type >= GL_BYTE && type <= GL_DOUBLE) ||
- type == GL_FIXED || type == GL_HALF_FLOAT);
+ type == GL_FIXED || type == GL_HALF_FLOAT ||
+ type == GL_INT_2_10_10_10_REV ||
+ type == GL_UNSIGNED_INT_2_10_10_10_REV);
assert(size >= 1);
assert(size <= 4);
assert(format == GL_RGBA || format == GL_BGRA);
+ if (type == GL_INT_2_10_10_10_REV ||
+ type == GL_UNSIGNED_INT_2_10_10_10_REV) {
+ assert(size == 4);
+
+ if (format == GL_BGRA) {
+ if (type == GL_INT_2_10_10_10_REV) {
+ if (normalized)
+ return PIPE_FORMAT_B10G10R10A2_SNORM;
+ else
+ return PIPE_FORMAT_B10G10R10A2_SSCALED;
+ } else {
+ if (normalized)
+ return PIPE_FORMAT_B10G10R10A2_UNORM;
+ else
+ return PIPE_FORMAT_B10G10R10A2_USCALED;
+ }
+ } else {
+ if (type == GL_INT_2_10_10_10_REV) {
+ if (normalized)
+ return PIPE_FORMAT_R10G10B10A2_SNORM;
+ else
+ return PIPE_FORMAT_R10G10B10A2_SSCALED;
+ } else {
+ if (normalized)
+ return PIPE_FORMAT_R10G10B10A2_UNORM;
+ else
+ return PIPE_FORMAT_R10G10B10A2_USCALED;
+ }
+ }
+ }
+
if (format == GL_BGRA) {
/* this is an odd-ball case */
assert(type == GL_UNSIGNED_BYTE);
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index 455462b03..7abb8d4fb 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -207,6 +207,7 @@ void st_init_limits(struct st_context *st) c->MaxProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MAX_TEXEL_OFFSET);
c->GLSLVersion = 120;
+ c->UniformBooleanTrue = ~0;
}
}
@@ -534,6 +535,33 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.ARB_ES2_compatibility = GL_TRUE;
}
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R10G10B10A2_UNORM,
+ PIPE_BUFFER, 0,
+ PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_UNORM,
+ PIPE_BUFFER, 0,
+ PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R10G10B10A2_SNORM,
+ PIPE_BUFFER, 0,
+ PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_SNORM,
+ PIPE_BUFFER, 0,
+ PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R10G10B10A2_USCALED,
+ PIPE_BUFFER, 0,
+ PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_USCALED,
+ PIPE_BUFFER, 0,
+ PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R10G10B10A2_SSCALED,
+ PIPE_BUFFER, 0,
+ PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_SSCALED,
+ PIPE_BUFFER, 0,
+ PIPE_BIND_VERTEX_BUFFER)) {
+ ctx->Extensions.ARB_vertex_type_2_10_10_10_rev = GL_TRUE;
+ }
+
if (screen->get_shader_param(screen, PIPE_SHADER_GEOMETRY, PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
#if 0 /* XXX re-enable when GLSL compiler again supports geometry shaders */
ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;
|