summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-23 10:12:30 -0600
committerBrian Paul <[email protected]>2010-04-23 12:29:31 -0600
commitf855193796b834e9f06775f8a7130837d1f86f95 (patch)
tree8225e6415c55fb6cb98d8887c72da4ded8b80c91 /src
parent00f8e5764d5b41714704c94575a5b6f873340a2f (diff)
llvmpipe: rename texture refs to resource refs
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.c38
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.h20
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c2
3 files changed, 34 insertions, 26 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index 182e7cb2303..0b185c4c412 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -35,6 +35,14 @@
#include "lp_debug.h"
+/** List of texture references */
+struct texture_ref {
+ struct pipe_resource *texture;
+ struct texture_ref *prev, *next; /**< linked list w/ u_simple_list.h */
+};
+
+
+
struct lp_scene *
lp_scene_create( struct pipe_context *pipe,
struct lp_scene_queue *queue )
@@ -57,7 +65,7 @@ lp_scene_create( struct pipe_context *pipe,
scene->data.head =
scene->data.tail = CALLOC_STRUCT(data_block);
- make_empty_list(&scene->textures);
+ make_empty_list(&scene->resources);
pipe_mutex_init(scene->mutex);
@@ -178,10 +186,10 @@ lp_scene_reset(struct lp_scene *scene )
/* Release texture refs
*/
{
- struct texture_ref *ref, *next, *ref_list = &scene->textures;
+ struct resource_ref *ref, *next, *ref_list = &scene->resources;
for (ref = ref_list->next; ref != ref_list; ref = next) {
next = next_elem(ref);
- pipe_resource_reference(&ref->texture, NULL);
+ pipe_resource_reference(&ref->resource, NULL);
FREE(ref);
}
make_empty_list(ref_list);
@@ -247,32 +255,32 @@ lp_scene_bin_size( const struct lp_scene *scene, unsigned x, unsigned y )
/**
- * Add a reference to a texture by the scene.
+ * Add a reference to a resource by the scene.
*/
void
-lp_scene_texture_reference( struct lp_scene *scene,
- struct pipe_resource *texture )
+lp_scene_add_resource_reference(struct lp_scene *scene,
+ struct pipe_resource *resource)
{
- struct texture_ref *ref = CALLOC_STRUCT(texture_ref);
+ struct resource_ref *ref = CALLOC_STRUCT(resource_ref);
if (ref) {
- struct texture_ref *ref_list = &scene->textures;
- pipe_resource_reference(&ref->texture, texture);
+ struct resource_ref *ref_list = &scene->resources;
+ pipe_resource_reference(&ref->resource, resource);
insert_at_tail(ref_list, ref);
}
}
/**
- * Does this scene have a reference to the given texture?
+ * Does this scene have a reference to the given resource?
*/
boolean
-lp_scene_is_resource_referenced( const struct lp_scene *scene,
- const struct pipe_resource *texture )
+lp_scene_is_resource_referenced(const struct lp_scene *scene,
+ const struct pipe_resource *resource)
{
- const struct texture_ref *ref_list = &scene->textures;
- const struct texture_ref *ref;
+ const struct resource_ref *ref_list = &scene->resources;
+ const struct resource_ref *ref;
foreach (ref, ref_list) {
- if (ref->texture == texture)
+ if (ref->resource == resource)
return TRUE;
}
return FALSE;
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h
index 5166a636a1b..3e2bd0e7b38 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.h
+++ b/src/gallium/drivers/llvmpipe/lp_scene.h
@@ -95,10 +95,10 @@ struct data_block_list {
};
-/** List of texture references */
-struct texture_ref {
- struct pipe_resource *texture;
- struct texture_ref *prev, *next; /**< linked list w/ u_simple_list.h */
+/** List of resource references */
+struct resource_ref {
+ struct pipe_resource *resource;
+ struct resource_ref *prev, *next; /**< linked list w/ u_simple_list.h */
};
@@ -116,8 +116,8 @@ struct lp_scene {
/** the framebuffer to render the scene into */
struct pipe_framebuffer_state fb;
- /** list of textures referenced by the scene commands */
- struct texture_ref textures;
+ /** list of resources referenced by the scene commands */
+ struct resource_ref resources;
boolean write_depth;
boolean has_color_clear;
@@ -162,11 +162,11 @@ unsigned lp_scene_data_size( const struct lp_scene *scene );
unsigned lp_scene_bin_size( const struct lp_scene *scene, unsigned x, unsigned y );
-void lp_scene_texture_reference( struct lp_scene *scene,
- struct pipe_resource *texture );
+void lp_scene_add_resource_reference(struct lp_scene *scene,
+ struct pipe_resource *resource);
-boolean lp_scene_is_resource_referenced( const struct lp_scene *scene,
- const struct pipe_resource *texture );
+boolean lp_scene_is_resource_referenced(const struct lp_scene *scene,
+ const struct pipe_resource *resource );
/**
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 6be13c60a57..210c7b8a908 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -715,7 +715,7 @@ lp_setup_update_state( struct lp_setup_context *setup )
*/
for (i = 0; i < Elements(setup->fs.current_tex); i++) {
if (setup->fs.current_tex[i])
- lp_scene_texture_reference(scene, setup->fs.current_tex[i]);
+ lp_scene_add_resource_reference(scene, setup->fs.current_tex[i]);
}
}
}