projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
86c8f70
)
gallium: fix remaining users of pipe_reference function
author
Roland Scheidegger
<sroland@vmware.com>
Thu, 3 Dec 2009 22:58:30 +0000
(23:58 +0100)
committer
Roland Scheidegger
<sroland@vmware.com>
Thu, 3 Dec 2009 22:58:30 +0000
(23:58 +0100)
src/gallium/drivers/nouveau/nouveau_stateobj.h
patch
|
blob
|
history
src/gallium/state_trackers/python/st_device.c
patch
|
blob
|
history
src/gallium/winsys/drm/intel/gem/intel_drm_fence.c
patch
|
blob
|
history
src/gallium/winsys/drm/vmware/core/vmw_surface.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/nouveau/nouveau_stateobj.h
b/src/gallium/drivers/nouveau/nouveau_stateobj.h
index b595405357f0044255261993c4887f1acdcfb8c5..62990f9b6a607333921dc4ecf16850f391095685 100644
(file)
--- a/
src/gallium/drivers/nouveau/nouveau_stateobj.h
+++ b/
src/gallium/drivers/nouveau/nouveau_stateobj.h
@@
-48,13
+48,14
@@
so_ref(struct nouveau_stateobj *ref, struct nouveau_stateobj **pso)
struct nouveau_stateobj *so = *pso;
int i;
struct nouveau_stateobj *so = *pso;
int i;
- if (pipe_reference(
(struct pipe_reference**)pso
, &ref->reference)) {
+ if (pipe_reference(
&(*pso)->reference
, &ref->reference)) {
free(so->push);
for (i = 0; i < so->cur_reloc; i++)
nouveau_bo_ref(NULL, &so->reloc[i].bo);
free(so->reloc);
free(so);
}
free(so->push);
for (i = 0; i < so->cur_reloc; i++)
nouveau_bo_ref(NULL, &so->reloc[i].bo);
free(so->reloc);
free(so);
}
+ *pso = ref;
}
static INLINE void
}
static INLINE void
diff --git
a/src/gallium/state_trackers/python/st_device.c
b/src/gallium/state_trackers/python/st_device.c
index a791113abac840f322d0ead2df9d5ddda5a56676..f19cf4b577135af0831dea511f3d5c025c822f3c 100644
(file)
--- a/
src/gallium/state_trackers/python/st_device.c
+++ b/
src/gallium/state_trackers/python/st_device.c
@@
-62,8
+62,9
@@
st_device_reference(struct st_device **ptr, struct st_device *st_dev)
{
struct st_device *old_dev = *ptr;
{
struct st_device *old_dev = *ptr;
- if (pipe_reference(
(struct pipe_reference **)ptr
, &st_dev->reference))
+ if (pipe_reference(
&(*ptr)->reference
, &st_dev->reference))
st_device_really_destroy(old_dev);
st_device_really_destroy(old_dev);
+ *ptr = st_dev;
}
}
diff --git
a/src/gallium/winsys/drm/intel/gem/intel_drm_fence.c
b/src/gallium/winsys/drm/intel/gem/intel_drm_fence.c
index e70bfe7b44e336911701a9c69db734d748236702..b6248a3bcf759b689f953b03ff2433021a03fe34 100644
(file)
--- a/
src/gallium/winsys/drm/intel/gem/intel_drm_fence.c
+++ b/
src/gallium/winsys/drm/intel/gem/intel_drm_fence.c
@@
-39,11
+39,12
@@
intel_drm_fence_reference(struct intel_winsys *iws,
struct intel_drm_fence *old = (struct intel_drm_fence *)*ptr;
struct intel_drm_fence *f = (struct intel_drm_fence *)fence;
struct intel_drm_fence *old = (struct intel_drm_fence *)*ptr;
struct intel_drm_fence *f = (struct intel_drm_fence *)fence;
- if (pipe_reference(
(struct pipe_reference**)ptr
, &f->reference)) {
+ if (pipe_reference(
&(*ptr)->reference
, &f->reference)) {
if (old->bo)
drm_intel_bo_unreference(old->bo);
FREE(old);
}
if (old->bo)
drm_intel_bo_unreference(old->bo);
FREE(old);
}
+ *ptr = fence;
}
static int
}
static int
diff --git
a/src/gallium/winsys/drm/vmware/core/vmw_surface.c
b/src/gallium/winsys/drm/vmware/core/vmw_surface.c
index 64eb32f8b94ef8f52356ef27af5c99409f50e03c..5f1b9ad577093dd49099fc6d02f46fb0728970a2 100644
(file)
--- a/
src/gallium/winsys/drm/vmware/core/vmw_surface.c
+++ b/
src/gallium/winsys/drm/vmware/core/vmw_surface.c
@@
-47,7
+47,7
@@
vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst,
src_ref = src ? &src->refcnt : NULL;
dst_ref = dst ? &dst->refcnt : NULL;
src_ref = src ? &src->refcnt : NULL;
dst_ref = dst ? &dst->refcnt : NULL;
- if (pipe_reference(
&
dst_ref, src_ref)) {
+ if (pipe_reference(dst_ref, src_ref)) {
vmw_ioctl_surface_destroy(dst->screen, dst->sid);
#ifdef DEBUG
/* to detect dangling pointers */
vmw_ioctl_surface_destroy(dst->screen, dst->sid);
#ifdef DEBUG
/* to detect dangling pointers */