Merge "opengles emulator: fix GL_EXT_packed_depth_stencil string"

This commit is contained in:
David Turner
2011-08-09 08:34:40 -07:00
committed by Android Code Review
6 changed files with 9 additions and 9 deletions

View File

@@ -272,7 +272,7 @@ void GLEScmContext::initExtensionString() {
*s_glExtensions+="GL_OES_framebuffer_object GL_OES_depth24 GL_OES_depth32 GL_OES_fbo_render_mipmap " *s_glExtensions+="GL_OES_framebuffer_object GL_OES_depth24 GL_OES_depth32 GL_OES_fbo_render_mipmap "
"GL_OES_rgb8_rgba8 GL_OES_stencil1 GL_OES_stencil4 GL_OES_stencil8 "; "GL_OES_rgb8_rgba8 GL_OES_stencil1 GL_OES_stencil4 GL_OES_stencil8 ";
} }
if (s_glSupport.GL_NV_PACKED_DEPTH_STENCIL) if (s_glSupport.GL_EXT_PACKED_DEPTH_STENCIL)
*s_glExtensions+="GL_OES_packed_depth_stencil "; *s_glExtensions+="GL_OES_packed_depth_stencil ";
if (s_glSupport.GL_EXT_TEXTURE_FORMAT_BGRA8888) if (s_glSupport.GL_EXT_TEXTURE_FORMAT_BGRA8888)
*s_glExtensions+="GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888 "; *s_glExtensions+="GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888 ";

View File

@@ -230,7 +230,7 @@ bool GLEScmValidate::renderbufferInternalFrmt(GLEScontext* ctx, GLenum internalf
case GL_DEPTH_COMPONENT32_OES: case GL_DEPTH_COMPONENT32_OES:
return true; return true;
} }
if (ctx->getCaps()->GL_NV_PACKED_DEPTH_STENCIL && internalformat==GL_DEPTH24_STENCIL8_OES) if (ctx->getCaps()->GL_EXT_PACKED_DEPTH_STENCIL && internalformat==GL_DEPTH24_STENCIL8_OES)
return true; return true;
return false; return false;

View File

@@ -93,7 +93,7 @@ void GLESv2Context::initExtensionString() {
"GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture "; "GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture ";
if (s_glSupport.GL_ARB_HALF_FLOAT_PIXEL || s_glSupport.GL_NV_HALF_FLOAT) if (s_glSupport.GL_ARB_HALF_FLOAT_PIXEL || s_glSupport.GL_NV_HALF_FLOAT)
*s_glExtensions+="GL_OES_texture_half_float GL_OES_texture_half_float_linear "; *s_glExtensions+="GL_OES_texture_half_float GL_OES_texture_half_float_linear ";
if (s_glSupport.GL_NV_PACKED_DEPTH_STENCIL) if (s_glSupport.GL_EXT_PACKED_DEPTH_STENCIL)
*s_glExtensions+="GL_OES_packed_depth_stencil "; *s_glExtensions+="GL_OES_packed_depth_stencil ";
if (s_glSupport.GL_ARB_HALF_FLOAT_VERTEX) if (s_glSupport.GL_ARB_HALF_FLOAT_VERTEX)
*s_glExtensions+="GL_OES_vertex_half_float "; *s_glExtensions+="GL_OES_vertex_half_float ";

View File

@@ -495,8 +495,8 @@ void GLEScontext::initCapsLocked(const GLubyte * extensionString)
if (strstr(cstring,"GL_ARB_matrix_palette ")!=NULL) if (strstr(cstring,"GL_ARB_matrix_palette ")!=NULL)
s_glSupport.GL_ARB_MATRIX_PALETTE = true; s_glSupport.GL_ARB_MATRIX_PALETTE = true;
if (strstr(cstring,"GL_NV_packed_depth_stencil ")!=NULL) if (strstr(cstring,"GL_EXT_packed_depth_stencil ")!=NULL )
s_glSupport.GL_NV_PACKED_DEPTH_STENCIL = true; s_glSupport.GL_EXT_PACKED_DEPTH_STENCIL = true;
if (strstr(cstring,"GL_OES_read_format ")!=NULL) if (strstr(cstring,"GL_OES_read_format ")!=NULL)
s_glSupport.GL_OES_READ_FORMAT = true; s_glSupport.GL_OES_READ_FORMAT = true;

View File

@@ -11,7 +11,7 @@ bool GLESvalidate::textureEnum(GLenum e,unsigned int maxTex) {
} }
bool GLESvalidate::pixelType(GLEScontext * ctx, GLenum type) { bool GLESvalidate::pixelType(GLEScontext * ctx, GLenum type) {
if ((ctx && ctx->getCaps()->GL_NV_PACKED_DEPTH_STENCIL) && if ((ctx && ctx->getCaps()->GL_EXT_PACKED_DEPTH_STENCIL) &&
(type == GL_UNSIGNED_INT_24_8_OES) ) (type == GL_UNSIGNED_INT_24_8_OES) )
return true; return true;
@@ -45,7 +45,7 @@ bool GLESvalidate::pixelOp(GLenum format,GLenum type) {
bool GLESvalidate::pixelFrmt(GLEScontext* ctx ,GLenum format) { bool GLESvalidate::pixelFrmt(GLEScontext* ctx ,GLenum format) {
if (ctx && ctx->getCaps()->GL_EXT_TEXTURE_FORMAT_BGRA8888 && format == GL_BGRA_EXT) if (ctx && ctx->getCaps()->GL_EXT_TEXTURE_FORMAT_BGRA8888 && format == GL_BGRA_EXT)
return true; return true;
if (ctx && ctx->getCaps()->GL_NV_PACKED_DEPTH_STENCIL && format == GL_DEPTH_STENCIL_OES) if (ctx && ctx->getCaps()->GL_EXT_PACKED_DEPTH_STENCIL && format == GL_DEPTH_STENCIL_OES)
return true; return true;
switch(format) { switch(format) {
case GL_ALPHA: case GL_ALPHA:

View File

@@ -41,7 +41,7 @@ struct GLSupport {
maxTexImageUnits(0),maxTexSize(0) , \ maxTexImageUnits(0),maxTexSize(0) , \
GL_EXT_TEXTURE_FORMAT_BGRA8888(false), GL_EXT_FRAMEBUFFER_OBJECT(false), \ GL_EXT_TEXTURE_FORMAT_BGRA8888(false), GL_EXT_FRAMEBUFFER_OBJECT(false), \
GL_ARB_VERTEX_BLEND(false), GL_ARB_MATRIX_PALETTE(false), \ GL_ARB_VERTEX_BLEND(false), GL_ARB_MATRIX_PALETTE(false), \
GL_NV_PACKED_DEPTH_STENCIL(false) , GL_OES_READ_FORMAT(false), \ GL_EXT_PACKED_DEPTH_STENCIL(false) , GL_OES_READ_FORMAT(false), \
GL_ARB_HALF_FLOAT_PIXEL(false), GL_NV_HALF_FLOAT(false), \ GL_ARB_HALF_FLOAT_PIXEL(false), GL_NV_HALF_FLOAT(false), \
GL_ARB_HALF_FLOAT_VERTEX(false),GL_SGIS_GENERATE_MIPMAP(false), GL_ARB_HALF_FLOAT_VERTEX(false),GL_SGIS_GENERATE_MIPMAP(false),
GL_ARB_ES2_COMPATIBILITY(false) {} ; GL_ARB_ES2_COMPATIBILITY(false) {} ;
@@ -56,7 +56,7 @@ struct GLSupport {
bool GL_EXT_FRAMEBUFFER_OBJECT; bool GL_EXT_FRAMEBUFFER_OBJECT;
bool GL_ARB_VERTEX_BLEND; bool GL_ARB_VERTEX_BLEND;
bool GL_ARB_MATRIX_PALETTE; bool GL_ARB_MATRIX_PALETTE;
bool GL_NV_PACKED_DEPTH_STENCIL; bool GL_EXT_PACKED_DEPTH_STENCIL;
bool GL_OES_READ_FORMAT; bool GL_OES_READ_FORMAT;
bool GL_ARB_HALF_FLOAT_PIXEL; bool GL_ARB_HALF_FLOAT_PIXEL;
bool GL_NV_HALF_FLOAT; bool GL_NV_HALF_FLOAT;