summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/image.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-09-21 10:48:21 +0800
committerChia-I Wu <[email protected]>2011-09-21 12:01:03 +0800
commitceb6d34906c7c03c102c7e78dd02f5b0ebab4ca9 (patch)
tree061792f65d8f8c0daffeabd24ee0be8531fba533 /src/gallium/state_trackers/vega/image.c
parentbdddf1cc26541d730bac309bd63dfdcaf4aea513 (diff)
st/vega: fix vg_context_is_object_valid()
vg_context_is_object_valid() checks if a handle is valid by checking if the handle is a valid key of the object hash table. However, the keys of the object hash table were object pointers. Fix vg_context_add_object() to use the handles as the keys so that vg_context_is_object_valid() works. This bug was introduced by 99c67f27d35a4bbbbefada8117d5972c7583cf42.
Diffstat (limited to 'src/gallium/state_trackers/vega/image.c')
-rw-r--r--src/gallium/state_trackers/vega/image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c
index 44480876b6e..c42315e4bba 100644
--- a/src/gallium/state_trackers/vega/image.c
+++ b/src/gallium/state_trackers/vega/image.c
@@ -287,7 +287,7 @@ struct vg_image * image_create(VGImageFormat format,
image->sampler_view = view;
- vg_context_add_object(ctx, VG_OBJECT_IMAGE, image);
+ vg_context_add_object(ctx, &image->base);
image_cleari(image, 0, 0, 0, image->width, image->height);
return image;
@@ -296,7 +296,7 @@ struct vg_image * image_create(VGImageFormat format,
void image_destroy(struct vg_image *img)
{
struct vg_context *ctx = vg_current_context();
- vg_context_remove_object(ctx, VG_OBJECT_IMAGE, img);
+ vg_context_remove_object(ctx, &img->base);
if (img->parent) {
@@ -502,7 +502,7 @@ struct vg_image * image_child_image(struct vg_image *parent,
array_append_data(parent->children_array,
&image, 1);
- vg_context_add_object(ctx, VG_OBJECT_IMAGE, image);
+ vg_context_add_object(ctx, &image->base);
return image;
}