Commit 7ba0cc90 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Add some TRACEs to command stream callbacks.

I.e., those used with wined3d_cs_init_object() and wined3d_cs_destroy_object(). Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b9a440d1
......@@ -4768,6 +4768,8 @@ static void wined3d_view_gl_destroy_object(void *object)
struct wined3d_device *device;
GLuint counter_id;
TRACE("ctx %p.\n", ctx);
device = ctx->device;
counter_id = ctx->counter_bo ? ctx->counter_bo->id : 0;
......@@ -4947,6 +4949,8 @@ static void wined3d_sampler_gl_destroy_object(void *object)
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
TRACE("sampler_gl %p.\n", sampler_gl);
if (sampler_gl->name)
{
context = context_acquire(sampler_gl->s.device, NULL, 0);
......@@ -4980,6 +4984,8 @@ static void wined3d_query_gl_destroy_object(void *object)
{
struct wined3d_query *query = object;
TRACE("query %p.\n", query);
if (query->buffer_object)
{
struct wined3d_context *context;
......
......@@ -1320,6 +1320,8 @@ static void wined3d_view_vk_destroy_object(void *object)
struct wined3d_device_vk *device_vk;
struct wined3d_context *context;
TRACE("ctx %p.\n", ctx);
device_vk = ctx->device_vk;
vk_info = &wined3d_adapter_vk(device_vk->d.adapter)->vk_info;
context = context_acquire(&device_vk->d, NULL, 0);
......@@ -1550,6 +1552,8 @@ static void wined3d_sampler_vk_destroy_object(void *object)
struct wined3d_sampler_vk *sampler_vk = object;
struct wined3d_context_vk *context_vk;
TRACE("sampler_vk %p.\n", sampler_vk);
context_vk = wined3d_context_vk(context_acquire(sampler_vk->s.device, NULL, 0));
wined3d_context_vk_destroy_sampler(context_vk, sampler_vk->vk_image_info.sampler, sampler_vk->command_buffer_id);
......@@ -1580,6 +1584,8 @@ static void wined3d_query_vk_destroy_object(void *object)
{
struct wined3d_query_vk *query_vk = object;
TRACE("query_vk %p.\n", query_vk);
query_vk->q.query_ops->query_destroy(&query_vk->q);
}
......
......@@ -669,6 +669,8 @@ static void wined3d_buffer_destroy_object(void *object)
struct wined3d_buffer *buffer = object;
struct wined3d_context *context;
TRACE("buffer %p.\n", buffer);
if (buffer->buffer_object)
{
context = context_acquire(buffer->resource.device, NULL, 0);
......
......@@ -1005,6 +1005,8 @@ void wined3d_device_delete_opengl_contexts_cs(void *object)
struct wined3d_context *context;
struct wined3d_shader *shader;
TRACE("device %p.\n", device);
device_gl = wined3d_device_gl(device);
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry)
......@@ -1038,6 +1040,8 @@ void wined3d_device_create_primary_opengl_context_cs(void *object)
struct wined3d_texture *target;
HRESULT hr;
TRACE("device %p.\n", device);
swapchain = device->swapchains[0];
target = swapchain->back_buffers ? swapchain->back_buffers[0] : swapchain->front_buffer;
if (!(context = context_acquire(device, target, 0)))
......
......@@ -35,6 +35,8 @@ ULONG CDECL wined3d_palette_incref(struct wined3d_palette *palette)
static void wined3d_palette_destroy_object(void *object)
{
TRACE("object %p.\n", object);
heap_free(object);
}
......
......@@ -428,6 +428,8 @@ static void wined3d_query_destroy_object(void *object)
{
struct wined3d_query *query = object;
TRACE("query %p.\n", query);
if (!list_empty(&query->poll_list_entry))
list_remove(&query->poll_list_entry);
}
......
......@@ -233,6 +233,8 @@ static void wined3d_resource_destroy_object(void *object)
{
struct wined3d_resource *resource = object;
TRACE("resource %p.\n", resource);
heap_free(resource->sub_resource_bind_counts_device);
wined3d_resource_free_sysmem(resource);
context_resource_released(resource->device, resource);
......
......@@ -76,6 +76,8 @@ static void wined3d_sampler_gl_cs_init(void *object)
struct wined3d_context *context;
GLuint name;
TRACE("sampler_gl %p.\n", sampler_gl);
context = context_acquire(sampler_gl->s.device, NULL, 0);
gl_info = wined3d_context_gl(context)->gl_info;
......@@ -182,6 +184,8 @@ static void wined3d_sampler_vk_cs_init(void *object)
VkSampler vk_sampler;
VkResult vr;
TRACE("sampler_vk %p.\n", sampler_vk);
context_vk = wined3d_context_vk(context_acquire(sampler_vk->s.device, NULL, 0));
device_vk = wined3d_device_vk(context_vk->c.device);
d3d_info = context_vk->c.d3d_info;
......
......@@ -3404,6 +3404,8 @@ static void wined3d_shader_init_object(void *object)
struct wined3d_shader *shader = object;
struct wined3d_device *device = shader->device;
TRACE("shader %p.\n", shader);
list_add_head(&device->shaders, &shader->shader_list_entry);
device->shader_backend->shader_precompile(device->shader_priv, shader);
......@@ -3411,6 +3413,8 @@ static void wined3d_shader_init_object(void *object)
static void wined3d_shader_destroy_object(void *object)
{
TRACE("object %p.\n", object);
shader_cleanup(object);
heap_free(object);
}
......
......@@ -48,6 +48,8 @@ ULONG CDECL wined3d_blend_state_incref(struct wined3d_blend_state *state)
static void wined3d_blend_state_destroy_object(void *object)
{
TRACE("object %p.\n", object);
heap_free(object);
}
......@@ -120,6 +122,8 @@ ULONG CDECL wined3d_depth_stencil_state_incref(struct wined3d_depth_stencil_stat
static void wined3d_depth_stencil_state_destroy_object(void *object)
{
TRACE("object %p.\n", object);
heap_free(object);
}
......@@ -181,6 +185,8 @@ ULONG CDECL wined3d_rasterizer_state_incref(struct wined3d_rasterizer_state *sta
static void wined3d_rasterizer_state_destroy_object(void *object)
{
TRACE("object %p.\n", object);
heap_free(object);
}
......
......@@ -1725,6 +1725,8 @@ void wined3d_swapchain_gl_destroy_contexts(struct wined3d_swapchain_gl *swapchai
{
unsigned int i;
TRACE("swapchain_gl %p.\n", swapchain_gl);
for (i = 0; i < swapchain_gl->context_count; ++i)
{
wined3d_context_gl_destroy(swapchain_gl->contexts[i]);
......
......@@ -1021,6 +1021,8 @@ static void wined3d_texture_destroy_dc(void *object)
struct wined3d_range range;
NTSTATUS status;
TRACE("texture %p, sub_resource_idx %u.\n", idx->texture, idx->sub_resource_idx);
texture = idx->texture;
sub_resource_idx = idx->sub_resource_idx;
device = texture->resource.device;
......
......@@ -54,6 +54,8 @@ static void wined3d_vertex_declaration_destroy_object(void *object)
{
struct wined3d_vertex_declaration *declaration = object;
TRACE("declaration %p.\n", declaration);
heap_free(declaration->elements);
heap_free(declaration);
}
......
......@@ -511,6 +511,8 @@ static void wined3d_render_target_view_gl_cs_init(void *object)
struct wined3d_resource *resource = view_gl->v.resource;
const struct wined3d_view_desc *desc = &view_gl->v.desc;
TRACE("view_gl %p.\n", view_gl);
if (resource->type == WINED3D_RTYPE_BUFFER)
{
FIXME("Not implemented for resources %s.\n", debug_d3dresourcetype(resource->type));
......@@ -792,6 +794,8 @@ static void wined3d_render_target_view_vk_cs_init(void *object)
struct wined3d_context *context;
uint32_t default_flags = 0;
TRACE("view_vk %p.\n", view_vk);
resource = view_vk->v.resource;
if (resource->type == WINED3D_RTYPE_BUFFER)
{
......@@ -934,6 +938,8 @@ static void wined3d_shader_resource_view_gl_cs_init(void *object)
const struct wined3d_view_desc *desc;
GLenum view_target;
TRACE("view_gl %p.\n", view_gl);
view_format = view_gl->v.format;
gl_info = &resource->device->adapter->gl_info;
desc = &view_gl->v.desc;
......@@ -1055,6 +1061,8 @@ static void wined3d_shader_resource_view_vk_cs_init(void *object)
uint32_t default_flags = 0;
VkImageView vk_image_view;
TRACE("srv_vk %p.\n", srv_vk);
resource = srv_vk->v.resource;
format = srv_vk->v.format;
......@@ -1421,6 +1429,8 @@ static void wined3d_unordered_access_view_gl_cs_init(void *object)
struct wined3d_view_desc *desc = &view_gl->v.desc;
const struct wined3d_gl_info *gl_info;
TRACE("view_gl %p.\n", view_gl);
gl_info = &resource->device->adapter->gl_info;
if (resource->type == WINED3D_RTYPE_BUFFER)
......@@ -1598,6 +1608,8 @@ static void wined3d_unordered_access_view_vk_cs_init(void *object)
VkImageView vk_image_view;
VkResult vr;
TRACE("uav_vk %p.\n", uav_vk);
resource = uav_vk->v.resource;
device_vk = wined3d_device_vk(resource->device);
format_vk = wined3d_format_vk(uav_vk->v.format);
......
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