* 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.
#include "util/u_inlines.h"
#include "util/u_hash_table.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/u_hash_table.h"
#include "util/u_memory.h"
trace_resource_create(struct trace_screen *tr_scr,
struct pipe_resource *texture)
{
trace_resource_create(struct trace_screen *tr_scr,
struct pipe_resource *texture)
{
- pipe_reference_init(&tr_tex->base.reference, 1);
- tr_tex->base.screen = &tr_scr->base;
- tr_tex->resource = texture;
+ pipe_reference_init(&tr_res->base.reference, 1);
+ tr_res->base.screen = &tr_scr->base;
+ tr_res->resource = texture;
- trace_screen_remove_from_list(tr_scr, textures, tr_tex);
-
- pipe_resource_reference(&tr_tex->resource, NULL);
- FREE(tr_tex);
+ pipe_resource_reference(&tr_res->resource, NULL);
+ FREE(tr_res);
-trace_surface_create(struct trace_resource *tr_tex,
- struct pipe_surface *surface)
+trace_surf_create(struct trace_context *tr_ctx,
+ struct trace_resource *tr_res,
+ struct pipe_surface *surface)
pipe_reference_init(&tr_surf->base.reference, 1);
tr_surf->base.texture = NULL;
pipe_reference_init(&tr_surf->base.reference, 1);
tr_surf->base.texture = NULL;
pipe_resource_reference(&tr_surf->base.texture, NULL);
pipe_surface_reference(&tr_surf->surface, NULL);
FREE(tr_surf);
pipe_resource_reference(&tr_surf->base.texture, NULL);
pipe_surface_reference(&tr_surf->surface, NULL);
FREE(tr_surf);
- pipe_resource_reference(&tr_trans->base.resource, &tr_tex->base);
- assert(tr_trans->base.resource == &tr_tex->base);
-
- trace_screen_add_to_list(tr_scr, transfers, tr_trans);
+ pipe_resource_reference(&tr_trans->base.resource, &tr_res->base);
+ assert(tr_trans->base.resource == &tr_res->base);
trace_transfer_destroy(struct trace_context *tr_context,
struct trace_transfer *tr_trans)
{
trace_transfer_destroy(struct trace_context *tr_context,
struct trace_transfer *tr_trans)
{
- struct trace_screen *tr_scr = trace_screen(tr_context->base.screen);
- struct pipe_context *context = tr_context->pipe;
- struct pipe_transfer *transfer = tr_trans->transfer;
-
- trace_screen_remove_from_list(tr_scr, transfers, tr_trans);
-