summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_state.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-02-03 18:54:13 +0000
committerJosé Fonseca <[email protected]>2010-02-03 18:54:13 +0000
commit45dac0d82a5a69166e86dce77c2550f7512c541e (patch)
tree41a10f422174ef9543db2396057f052c056eb396 /src/gallium/include/pipe/p_state.h
parentf8d824e09a54871df899f368ebaadc9a4e5b62ff (diff)
parent976afaf98f4b1ce32003dd014cbb3c09063bcb68 (diff)
Merge branch 'gallium-embedded'
Diffstat (limited to 'src/gallium/include/pipe/p_state.h')
-rw-r--r--src/gallium/include/pipe/p_state.h39
1 files changed, 6 insertions, 33 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 03cd74efed3..9ae096ee3cf 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -43,7 +43,6 @@
#include "p_compiler.h"
#include "p_defines.h"
#include "p_format.h"
-#include "p_refcnt.h"
#include "p_screen.h"
@@ -66,6 +65,12 @@ extern "C" {
#define PIPE_MAX_TEXTURE_LEVELS 16
+struct pipe_reference
+{
+ int32_t count; /* atomic */
+};
+
+
/**
* The driver will certainly subclass this to include actual memory
* management information.
@@ -383,38 +388,6 @@ struct pipe_vertex_element
};
-/* Reference counting helper functions */
-static INLINE void
-pipe_buffer_reference(struct pipe_buffer **ptr, struct pipe_buffer *buf)
-{
- struct pipe_buffer *old_buf = *ptr;
-
- if (pipe_reference(&(*ptr)->reference, &buf->reference))
- old_buf->screen->buffer_destroy(old_buf);
- *ptr = buf;
-}
-
-static INLINE void
-pipe_surface_reference(struct pipe_surface **ptr, struct pipe_surface *surf)
-{
- struct pipe_surface *old_surf = *ptr;
-
- if (pipe_reference(&(*ptr)->reference, &surf->reference))
- old_surf->texture->screen->tex_surface_destroy(old_surf);
- *ptr = surf;
-}
-
-static INLINE void
-pipe_texture_reference(struct pipe_texture **ptr, struct pipe_texture *tex)
-{
- struct pipe_texture *old_tex = *ptr;
-
- if (pipe_reference(&(*ptr)->reference, &tex->reference))
- old_tex->screen->texture_destroy(old_tex);
- *ptr = tex;
-}
-
-
#ifdef __cplusplus
}
#endif