Commit b5095b48 authored by Keith Whitwell's avatar Keith Whitwell

i915: use helpers for is_resource_referenced

parent d5392bdc
......@@ -123,27 +123,6 @@ i915_draw_arrays(struct pipe_context *pipe,
}
/*
* Is referenced functions
*/
static unsigned int
i915_is_resource_referenced(struct pipe_context *pipe,
struct pipe_resource *texture,
unsigned face, unsigned level)
{
/**
* FIXME: Return the corrent result. We can't alays return referenced
* since it causes a double flush within the vbo module.
*/
#if 0
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
#else
return 0;
#endif
}
/*
......@@ -192,8 +171,6 @@ i915_create_context(struct pipe_screen *screen, void *priv)
i915->base.draw_elements = i915_draw_elements;
i915->base.draw_range_elements = i915_draw_range_elements;
i915->base.is_resource_referenced = i915_is_resource_referenced;
/*
* Create drawing context and plug our rendering stage into it.
*/
......
......@@ -31,6 +31,7 @@ i915_resource_from_handle(struct pipe_screen * screen,
void
i915_init_resource_functions(struct i915_context *i915 )
{
i915->base.is_resource_referenced = u_default_is_resource_referenced;
i915->base.get_transfer = u_get_transfer_vtbl;
i915->base.transfer_map = u_transfer_map_vtbl;
i915->base.transfer_flush_region = u_transfer_flush_region_vtbl;
......
......@@ -93,6 +93,7 @@ struct u_resource_vtbl i915_buffer_vtbl =
{
i915_buffer_get_handle, /* get_handle */
i915_buffer_destroy, /* resource_destroy */
NULL, /* is_resource_referenced */
u_default_get_transfer, /* get_transfer */
u_default_transfer_destroy, /* transfer_destroy */
i915_buffer_transfer_map, /* transfer_map */
......
......@@ -703,6 +703,7 @@ struct u_resource_vtbl i915_texture_vtbl =
{
i915_texture_get_handle, /* get_handle */
i915_texture_destroy, /* resource_destroy */
NULL, /* is_resource_referenced */
u_default_get_transfer, /* get_transfer */
u_default_transfer_destroy, /* transfer_destroy */
i915_texture_transfer_map, /* transfer_map */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment