summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/mask.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/mask.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/mask.c')
-rw-r--r--src/gallium/state_trackers/vega/mask.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c
index 10590e29cd2..1280ea9dc8e 100644
--- a/src/gallium/state_trackers/vega/mask.c
+++ b/src/gallium/state_trackers/vega/mask.c
@@ -365,7 +365,7 @@ struct vg_mask_layer * mask_layer_create(VGint width, VGint height)
mask->sampler_view = view;
}
- vg_context_add_object(ctx, VG_OBJECT_MASK, mask);
+ vg_context_add_object(ctx, &mask->base);
return mask;
}
@@ -374,7 +374,7 @@ void mask_layer_destroy(struct vg_mask_layer *layer)
{
struct vg_context *ctx = vg_current_context();
- vg_context_remove_object(ctx, VG_OBJECT_MASK, layer);
+ vg_context_remove_object(ctx, &layer->base);
pipe_sampler_view_reference(&layer->sampler_view, NULL);
FREE(layer);
}