mesa: Add missing features.
Add features tested in the code but missing from mfeatures.h. This also fixes some tests of features. They should be tested with "#if", not "#ifdef".
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
/*#define BOUNDS_CHECK*/
|
/*#define BOUNDS_CHECK*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef FEATURE_OES_mapbuffer
|
#if FEATURE_OES_mapbuffer
|
||||||
#define DEFAULT_ACCESS GL_MAP_WRITE_BIT
|
#define DEFAULT_ACCESS GL_MAP_WRITE_BIT
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_ACCESS (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT)
|
#define DEFAULT_ACCESS (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT)
|
||||||
|
@@ -873,7 +873,7 @@ _mesa_initialize_context(GLcontext *ctx,
|
|||||||
ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
|
ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEATURE_extra_context_init
|
#if FEATURE_extra_context_init
|
||||||
_mesa_initialize_context_extra(ctx);
|
_mesa_initialize_context_extra(ctx);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -480,7 +480,7 @@ _mesa_enable_2_1_extensions(GLcontext *ctx)
|
|||||||
#if FEATURE_EXT_texture_sRGB
|
#if FEATURE_EXT_texture_sRGB
|
||||||
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
|
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEATURE_ARB_shading_language_120
|
#if FEATURE_ARB_shading_language_120
|
||||||
ctx->Extensions.ARB_shading_language_120 = GL_TRUE;
|
ctx->Extensions.ARB_shading_language_120 = GL_TRUE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -629,7 +629,7 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef FEATURE_OES_framebuffer_object
|
#if !FEATURE_OES_framebuffer_object
|
||||||
/* Check that all DrawBuffers are present */
|
/* Check that all DrawBuffers are present */
|
||||||
for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
|
for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
|
||||||
if (fb->ColorDrawBuffer[j] != GL_NONE) {
|
if (fb->ColorDrawBuffer[j] != GL_NONE) {
|
||||||
|
@@ -110,6 +110,7 @@
|
|||||||
#define FEATURE_texture_fxt1 FEATURE_GL
|
#define FEATURE_texture_fxt1 FEATURE_GL
|
||||||
#define FEATURE_texture_s3tc FEATURE_GL
|
#define FEATURE_texture_s3tc FEATURE_GL
|
||||||
|
|
||||||
|
#define FEATURE_extra_context_init FEATURE_ES
|
||||||
#define FEATURE_fixedpt FEATURE_ES
|
#define FEATURE_fixedpt FEATURE_ES
|
||||||
#define FEATURE_point_size_array FEATURE_ES
|
#define FEATURE_point_size_array FEATURE_ES
|
||||||
#define FEATURE_vertex_array_byte FEATURE_ES
|
#define FEATURE_vertex_array_byte FEATURE_ES
|
||||||
@@ -142,5 +143,8 @@
|
|||||||
#define FEATURE_NV_vertex_program FEATURE_GL
|
#define FEATURE_NV_vertex_program FEATURE_GL
|
||||||
|
|
||||||
#define FEATURE_OES_EGL_image 1
|
#define FEATURE_OES_EGL_image 1
|
||||||
|
#define FEATURE_OES_draw_texture FEATURE_ES1
|
||||||
|
#define FEATURE_OES_framebuffer_object FEATURE_ES
|
||||||
|
#define FEATURE_OES_mapbuffer FEATURE_ES
|
||||||
|
|
||||||
#endif /* FEATURES_H */
|
#endif /* FEATURES_H */
|
||||||
|
@@ -371,7 +371,7 @@ set_tex_parameteri(GLcontext *ctx,
|
|||||||
}
|
}
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
#ifdef FEATURE_OES_draw_texture
|
#if FEATURE_OES_draw_texture
|
||||||
case GL_TEXTURE_CROP_RECT_OES:
|
case GL_TEXTURE_CROP_RECT_OES:
|
||||||
texObj->CropRect[0] = params[0];
|
texObj->CropRect[0] = params[0];
|
||||||
texObj->CropRect[1] = params[1];
|
texObj->CropRect[1] = params[1];
|
||||||
@@ -604,7 +604,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef FEATURE_OES_draw_texture
|
#if FEATURE_OES_draw_texture
|
||||||
case GL_TEXTURE_CROP_RECT_OES:
|
case GL_TEXTURE_CROP_RECT_OES:
|
||||||
{
|
{
|
||||||
/* convert float params to int */
|
/* convert float params to int */
|
||||||
@@ -1160,7 +1160,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
|
|||||||
else
|
else
|
||||||
error = GL_TRUE;
|
error = GL_TRUE;
|
||||||
break;
|
break;
|
||||||
#ifdef FEATURE_OES_draw_texture
|
#if FEATURE_OES_draw_texture
|
||||||
case GL_TEXTURE_CROP_RECT_OES:
|
case GL_TEXTURE_CROP_RECT_OES:
|
||||||
params[0] = obj->CropRect[0];
|
params[0] = obj->CropRect[0];
|
||||||
params[1] = obj->CropRect[1];
|
params[1] = obj->CropRect[1];
|
||||||
@@ -1330,7 +1330,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
|
|||||||
error = GL_TRUE;
|
error = GL_TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef FEATURE_OES_draw_texture
|
#if FEATURE_OES_draw_texture
|
||||||
case GL_TEXTURE_CROP_RECT_OES:
|
case GL_TEXTURE_CROP_RECT_OES:
|
||||||
params[0] = obj->CropRect[0];
|
params[0] = obj->CropRect[0];
|
||||||
params[1] = obj->CropRect[1];
|
params[1] = obj->CropRect[1];
|
||||||
|
Reference in New Issue
Block a user