mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
mesa: add _mesa_get_list helper
glthread will use it. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297>
This commit is contained in:
parent
fd678bef40
commit
14b47614b4
2 changed files with 9 additions and 6 deletions
|
|
@ -11351,9 +11351,9 @@ _mesa_compile_error(struct gl_context *ctx, GLenum error, const char *s)
|
|||
/**
|
||||
* Test if ID names a display list.
|
||||
*/
|
||||
static GLboolean
|
||||
islist(struct gl_context *ctx, GLuint list,
|
||||
struct gl_display_list ** dlist)
|
||||
bool
|
||||
_mesa_get_list(struct gl_context *ctx, GLuint list,
|
||||
struct gl_display_list **dlist)
|
||||
{
|
||||
struct gl_display_list * dl =
|
||||
list > 0 ? _mesa_lookup_list(ctx, list) : NULL;
|
||||
|
|
@ -11384,7 +11384,7 @@ execute_list(struct gl_context *ctx, GLuint list)
|
|||
Node *n;
|
||||
GLboolean done;
|
||||
|
||||
if (list == 0 || !islist(ctx, list, &dlist))
|
||||
if (list == 0 || !_mesa_get_list(ctx, list, &dlist))
|
||||
return;
|
||||
|
||||
if (ctx->ListState.CallDepth == MAX_LIST_NESTING) {
|
||||
|
|
@ -13624,7 +13624,7 @@ _mesa_IsList(GLuint list)
|
|||
GET_CURRENT_CONTEXT(ctx);
|
||||
FLUSH_VERTICES(ctx, 0); /* must be called before assert */
|
||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
return islist(ctx, list, NULL);
|
||||
return _mesa_get_list(ctx, list, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -14694,7 +14694,7 @@ print_list(struct gl_context *ctx, GLuint list, const char *fname)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!islist(ctx, list, &dlist)) {
|
||||
if (!_mesa_get_list(ctx, list, &dlist)) {
|
||||
fprintf(f, "%u is not a display list ID\n", list);
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,5 +133,8 @@ _mesa_init_display_list(struct gl_context * ctx);
|
|||
void
|
||||
_mesa_free_display_list_data(struct gl_context *ctx);
|
||||
|
||||
bool
|
||||
_mesa_get_list(struct gl_context *ctx, GLuint list,
|
||||
struct gl_display_list **dlist);
|
||||
|
||||
#endif /* DLIST_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue