* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
-struct pipe_texture *
-trace_texture_create(struct trace_screen *tr_scr,
- struct pipe_texture *texture)
+struct pipe_resource *
+trace_resource_create(struct trace_screen *tr_scr,
+ struct pipe_resource *texture)
-
- memcpy(&tr_tex->base, texture, sizeof(struct pipe_texture));
- tr_tex->base.screen = &tr_scr->base;
- tr_tex->texture = texture;
-
- return &tr_tex->base;
-
+
+ memcpy(&tr_res->base, texture, sizeof(struct pipe_resource));
+
+ pipe_reference_init(&tr_res->base.reference, 1);
+ tr_res->base.screen = &tr_scr->base;
+ tr_res->resource = texture;
+
+ return &tr_res->base;
+
-trace_texture_destroy(struct trace_screen *tr_scr,
- struct pipe_texture *texture)
+trace_resource_destroy(struct trace_screen *tr_scr,
+ struct trace_resource *tr_res)
- struct trace_texture *tr_tex = trace_texture(tr_scr, texture);
- pipe_texture_reference(&tr_tex->texture, NULL);
- FREE(tr_tex);
+ pipe_resource_reference(&tr_res->resource, NULL);
+ FREE(tr_res);
-trace_surface_create(struct trace_texture *tr_tex,
- struct pipe_surface *surface)
+trace_surf_create(struct trace_context *tr_ctx,
+ struct trace_resource *tr_res,
+ struct pipe_surface *surface)
- struct trace_surface *tr_surf = trace_surface(tr_tex, surface);
- pipe_texture_reference(&tr_surf->base.texture, NULL);
+ trace_context_check(tr_surf->base.context);
+ pipe_resource_reference(&tr_surf->base.texture, NULL);
-trace_transfer_create(struct trace_texture *tr_tex,
- struct pipe_transfer *transfer)
+trace_transfer_create(struct trace_context *tr_ctx,
+ struct trace_resource *tr_res,
+ struct pipe_transfer *transfer)
-trace_transfer_destroy(struct trace_texture *tr_tex,
- struct pipe_transfer *transfer)
+trace_transfer_destroy(struct trace_context *tr_context,
+ struct trace_transfer *tr_trans)
- struct trace_transfer *tr_trans = trace_transfer(tr_tex, transfer);
- pipe_texture_reference(&tr_trans->base.texture, NULL);
- pipe_transfer_reference(&tr_trans->transfer, NULL);
+ pipe_resource_reference(&tr_trans->base.resource, NULL);