Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mesa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2,323
Issues
2,323
List
Boards
Labels
Service Desk
Milestones
Merge Requests
640
Merge Requests
640
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mesa
mesa
Commits
5a175127
Commit
5a175127
authored
Aug 22, 2011
by
Ian Romanick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dri: Remove all extension enabling utility functions
Reviewed-by:
Kenneth Graunke
<
kenneth@whitecape.org
>
parent
67d90634
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
148 deletions
+0
-148
src/mesa/drivers/dri/common/utils.c
src/mesa/drivers/dri/common/utils.c
+0
-114
src/mesa/drivers/dri/common/utils.h
src/mesa/drivers/dri/common/utils.h
+0
-25
src/mesa/drivers/dri/intel/intel_extensions_es.c
src/mesa/drivers/dri/intel/intel_extensions_es.c
+0
-6
src/mesa/drivers/dri/swrast/swrast.c
src/mesa/drivers/dri/swrast/swrast.c
+0
-3
No files found.
src/mesa/drivers/dri/common/utils.c
View file @
5a175127
...
@@ -137,120 +137,6 @@ driGetRendererString( char * buffer, const char * hardware_name,
...
@@ -137,120 +137,6 @@ driGetRendererString( char * buffer, const char * hardware_name,
}
}
#define need_GL_ARB_copy_buffer
#define need_GL_ARB_draw_buffers
#define need_GL_ARB_multisample
#define need_GL_ARB_texture_compression
#define need_GL_ARB_transpose_matrix
#define need_GL_ARB_vertex_buffer_object
#define need_GL_ARB_window_pos
#define need_GL_EXT_compiled_vertex_array
#define need_GL_EXT_multi_draw_arrays
#define need_GL_EXT_polygon_offset
#define need_GL_EXT_texture_object
#define need_GL_EXT_vertex_array
#define need_GL_IBM_multimode_draw_arrays
#define need_GL_MESA_window_pos
/* These are needed in *all* drivers because Mesa internally implements
* certain functionality in terms of functions provided by these extensions.
* For example, glBlendFunc is implemented by calling glBlendFuncSeparateEXT.
*/
#define need_GL_EXT_blend_func_separate
#define need_GL_NV_vertex_program
#include "main/remap_helper.h"
static
const
struct
dri_extension
all_mesa_extensions
[]
=
{
{
"GL_ARB_copy_buffer"
,
GL_ARB_copy_buffer_functions
},
{
"GL_ARB_draw_buffers"
,
GL_ARB_draw_buffers_functions
},
{
"GL_ARB_multisample"
,
GL_ARB_multisample_functions
},
{
"GL_ARB_texture_compression"
,
GL_ARB_texture_compression_functions
},
{
"GL_ARB_transpose_matrix"
,
GL_ARB_transpose_matrix_functions
},
{
"GL_ARB_vertex_buffer_object"
,
GL_ARB_vertex_buffer_object_functions
},
{
"GL_ARB_window_pos"
,
GL_ARB_window_pos_functions
},
{
"GL_EXT_blend_func_separate"
,
GL_EXT_blend_func_separate_functions
},
{
"GL_EXT_compiled_vertex_array"
,
GL_EXT_compiled_vertex_array_functions
},
{
"GL_EXT_multi_draw_arrays"
,
GL_EXT_multi_draw_arrays_functions
},
{
"GL_EXT_polygon_offset"
,
GL_EXT_polygon_offset_functions
},
{
"GL_EXT_texture_object"
,
GL_EXT_texture_object_functions
},
{
"GL_EXT_vertex_array"
,
GL_EXT_vertex_array_functions
},
{
"GL_IBM_multimode_draw_arrays"
,
GL_IBM_multimode_draw_arrays_functions
},
{
"GL_MESA_window_pos"
,
GL_MESA_window_pos_functions
},
{
"GL_NV_vertex_program"
,
GL_NV_vertex_program_functions
},
{
NULL
,
NULL
}
};
/**
* Enable and map extensions supported by the driver.
*
* When ctx is NULL, extensions are not enabled, but their functions
* are still mapped. When extensions_to_enable is NULL, all static
* functions known to mesa core are mapped.
*
* \bug
* ARB_imaging isn't handled properly. In Mesa, enabling ARB_imaging also
* enables all the sub-extensions that are folded into it. This means that
* we need to add entry-points (via \c driInitSingleExtension) for those
* new functions here.
*/
void
driInitExtensions
(
struct
gl_context
*
ctx
,
const
struct
dri_extension
*
extensions_to_enable
,
GLboolean
enable_imaging
)
{
static
int
first_time
=
1
;
unsigned
i
;
if
(
first_time
)
{
first_time
=
0
;
driInitExtensions
(
NULL
,
all_mesa_extensions
,
GL_FALSE
);
}
if
(
(
ctx
!=
NULL
)
&&
enable_imaging
)
{
_mesa_enable_imaging_extensions
(
ctx
);
}
/* The caller is too lazy to list any extension */
if
(
extensions_to_enable
==
NULL
)
{
/* Map the static functions. Together with those mapped by remap
* table, this should cover everything mesa core knows.
*/
_mesa_map_static_functions
();
return
;
}
for
(
i
=
0
;
extensions_to_enable
[
i
].
name
!=
NULL
;
i
++
)
{
driInitSingleExtension
(
ctx
,
&
extensions_to_enable
[
i
]
);
}
}
/**
* Enable and map functions for a single extension
*
* \param ctx Context where extension is to be enabled.
* \param ext Extension that is to be enabled.
*
* \sa driInitExtensions, _mesa_enable_extension, _mesa_map_function_array
*/
void
driInitSingleExtension
(
struct
gl_context
*
ctx
,
const
struct
dri_extension
*
ext
)
{
if
(
ext
->
functions
!=
NULL
)
{
_mesa_map_function_array
(
ext
->
functions
);
}
if
(
ctx
!=
NULL
)
{
_mesa_enable_extension
(
ctx
,
ext
->
name
);
}
}
/**
/**
* Utility function used by drivers to test the verions of other components.
* Utility function used by drivers to test the verions of other components.
*
*
...
...
src/mesa/drivers/dri/common/utils.h
View file @
5a175127
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#include <GL/gl.h>
#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
#include <GL/internal/dri_interface.h>
#include "main/context.h"
#include "main/context.h"
#include "main/remap.h"
typedef
struct
__DRIutilversionRec2
__DRIutilversion2
;
typedef
struct
__DRIutilversionRec2
__DRIutilversion2
;
...
@@ -40,24 +39,6 @@ struct dri_debug_control {
...
@@ -40,24 +39,6 @@ struct dri_debug_control {
unsigned
flag
;
unsigned
flag
;
};
};
/**
* Description of the API for an extension to OpenGL.
*/
struct
dri_extension
{
/**
* Name of the extension.
*/
const
char
*
name
;
/**
* Pointer to a list of \c dri_extension_function structures. The list
* is terminated by a structure with a \c NULL
* \c dri_extension_function::strings pointer.
*/
const
struct
gl_function_remap
*
functions
;
};
/**
/**
* Used to store a version which includes a major range instead of a single
* Used to store a version which includes a major range instead of a single
* major version number.
* major version number.
...
@@ -78,12 +59,6 @@ extern unsigned driParseDebugString( const char * debug,
...
@@ -78,12 +59,6 @@ extern unsigned driParseDebugString( const char * debug,
extern
unsigned
driGetRendererString
(
char
*
buffer
,
extern
unsigned
driGetRendererString
(
char
*
buffer
,
const
char
*
hardware_name
,
GLuint
agp_mode
);
const
char
*
hardware_name
,
GLuint
agp_mode
);
extern
void
driInitExtensions
(
struct
gl_context
*
ctx
,
const
struct
dri_extension
*
card_extensions
,
GLboolean
enable_imaging
);
extern
void
driInitSingleExtension
(
struct
gl_context
*
ctx
,
const
struct
dri_extension
*
ext
);
extern
GLboolean
driCheckDriDdxDrmVersions2
(
const
char
*
driver_name
,
extern
GLboolean
driCheckDriDdxDrmVersions2
(
const
char
*
driver_name
,
const
__DRIversion
*
driActual
,
const
__DRIversion
*
driExpected
,
const
__DRIversion
*
driActual
,
const
__DRIversion
*
driExpected
,
const
__DRIversion
*
ddxActual
,
const
__DRIversion
*
ddxExpected
,
const
__DRIversion
*
ddxActual
,
const
__DRIversion
*
ddxExpected
,
...
...
src/mesa/drivers/dri/intel/intel_extensions_es.c
View file @
5a175127
...
@@ -115,9 +115,6 @@ intelInitExtensionsES1(struct gl_context *ctx)
...
@@ -115,9 +115,6 @@ intelInitExtensionsES1(struct gl_context *ctx)
{
{
int
i
;
int
i
;
/* Can't use driInitExtensions() since it uses extensions from
* main/remap_helper.h when called the first time. */
for
(
i
=
0
;
common_extensions
[
i
];
i
++
)
for
(
i
=
0
;
common_extensions
[
i
];
i
++
)
_mesa_enable_extension
(
ctx
,
common_extensions
[
i
]);
_mesa_enable_extension
(
ctx
,
common_extensions
[
i
]);
for
(
i
=
0
;
es1_extensions
[
i
];
i
++
)
for
(
i
=
0
;
es1_extensions
[
i
];
i
++
)
...
@@ -144,9 +141,6 @@ intelInitExtensionsES2(struct gl_context *ctx)
...
@@ -144,9 +141,6 @@ intelInitExtensionsES2(struct gl_context *ctx)
{
{
int
i
;
int
i
;
/* Can't use driInitExtensions() since it uses extensions from
* main/remap_helper.h when called the first time. */
for
(
i
=
0
;
common_extensions
[
i
];
i
++
)
for
(
i
=
0
;
common_extensions
[
i
];
i
++
)
_mesa_enable_extension
(
ctx
,
common_extensions
[
i
]);
_mesa_enable_extension
(
ctx
,
common_extensions
[
i
]);
for
(
i
=
0
;
es2_extensions
[
i
];
i
++
)
for
(
i
=
0
;
es2_extensions
[
i
];
i
++
)
...
...
src/mesa/drivers/dri/swrast/swrast.c
View file @
5a175127
...
@@ -623,9 +623,6 @@ InitExtensionsES2(struct gl_context *ctx)
...
@@ -623,9 +623,6 @@ InitExtensionsES2(struct gl_context *ctx)
{
{
int
i
;
int
i
;
/* Can't use driInitExtensions() since it uses extensions from
* main/remap_helper.h when called the first time. */
for
(
i
=
0
;
es2_extensions
[
i
];
i
++
)
for
(
i
=
0
;
es2_extensions
[
i
];
i
++
)
_mesa_enable_extension
(
ctx
,
es2_extensions
[
i
]);
_mesa_enable_extension
(
ctx
,
es2_extensions
[
i
]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment