summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2020-03-21 22:49:03 -0400
committerMarek Olšák <marek.olsak@amd.com>2020-04-06 10:28:53 -0400
commitf3cce7087a562f77be7306e70d4e62bc214bb5fa (patch)
tree1d5f93dc13deb0e7822a9296a4b48f61442ec665 /src/mesa/tnl
parente630271e0ec3eee7d921d76d3924873f6ee6b59b (diff)
mesa: don't ever bind NullBufferObj for glBindBuffer targets
Since VAOs don't use NullBufferObj for vertex attribs anymore, let's remove more uses of NullBufferObj. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_rebase.c4
-rw-r--r--src/mesa/tnl/t_split_copy.c2
-rw-r--r--src/mesa/tnl/t_split_inplace.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_rebase.c b/src/mesa/tnl/t_rebase.c
index 07e603b0107..e6e5c9f3dfa 100644
--- a/src/mesa/tnl/t_rebase.c
+++ b/src/mesa/tnl/t_rebase.c
@@ -151,7 +151,7 @@ void t_rebase_prims( struct gl_context *ctx,
} else if (ib) {
/* Unfortunately need to adjust each index individually.
*/
- GLboolean map_ib = ib->obj->Name &&
+ GLboolean map_ib = ib->obj &&
!ib->obj->Mappings[MAP_INTERNAL].Pointer;
void *ptr;
@@ -184,7 +184,7 @@ void t_rebase_prims( struct gl_context *ctx,
return;
}
- tmp_ib.obj = ctx->Shared->NullBufferObj;
+ tmp_ib.obj = NULL;
tmp_ib.ptr = tmp_indices;
tmp_ib.count = ib->count;
tmp_ib.index_size_shift = ib->index_size_shift;
diff --git a/src/mesa/tnl/t_split_copy.c b/src/mesa/tnl/t_split_copy.c
index 5b300e93553..9df55c78558 100644
--- a/src/mesa/tnl/t_split_copy.c
+++ b/src/mesa/tnl/t_split_copy.c
@@ -555,7 +555,7 @@ replay_init(struct copy_context *copy)
*/
copy->dstib.count = 0; /* duplicates dstelt_nr */
copy->dstib.index_size_shift = 2;
- copy->dstib.obj = ctx->Shared->NullBufferObj;
+ copy->dstib.obj = NULL;
copy->dstib.ptr = copy->dstelt;
}
diff --git a/src/mesa/tnl/t_split_inplace.c b/src/mesa/tnl/t_split_inplace.c
index 76d3d89094a..817b641e515 100644
--- a/src/mesa/tnl/t_split_inplace.c
+++ b/src/mesa/tnl/t_split_inplace.c
@@ -228,7 +228,7 @@ split_prims(struct split_context *split)
ib.count = count;
ib.index_size_shift = 2;
- ib.obj = split->ctx->Shared->NullBufferObj;
+ ib.obj = NULL;
ib.ptr = elts;
tmpprim = *prim;