summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ddebug/dd_draw.c33
-rw-r--r--src/gallium/drivers/ddebug/dd_pipe.h1
2 files changed, 34 insertions, 0 deletions
diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index e01d2aef800..5cbc2b9e48c 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -451,6 +451,13 @@ dd_dump_clear_buffer(struct dd_draw_state *dstate, struct call_clear_buffer *inf
}
static void
+dd_dump_clear_texture(struct dd_draw_state *dstate, FILE *f)
+{
+ fprintf(f, "%s:\n", __func__+8);
+ /* TODO */
+}
+
+static void
dd_dump_clear_render_target(struct dd_draw_state *dstate, FILE *f)
{
fprintf(f, "%s:\n", __func__+8);
@@ -501,6 +508,9 @@ dd_dump_call(FILE *f, struct dd_draw_state *state, struct dd_call *call)
case CALL_CLEAR_BUFFER:
dd_dump_clear_buffer(state, &call->info.clear_buffer, f);
break;
+ case CALL_CLEAR_TEXTURE:
+ dd_dump_clear_texture(state, f);
+ break;
case CALL_CLEAR_RENDER_TARGET:
dd_dump_clear_render_target(state, f);
break;
@@ -619,6 +629,8 @@ dd_unreference_copy_of_call(struct dd_call *dst)
case CALL_CLEAR_BUFFER:
pipe_resource_reference(&dst->info.clear_buffer.res, NULL);
break;
+ case CALL_CLEAR_TEXTURE:
+ break;
case CALL_CLEAR_RENDER_TARGET:
break;
case CALL_CLEAR_DEPTH_STENCIL:
@@ -675,6 +687,8 @@ dd_copy_call(struct dd_call *dst, struct dd_call *src)
src->info.clear_buffer.res);
dst->info.clear_buffer = src->info.clear_buffer;
break;
+ case CALL_CLEAR_TEXTURE:
+ break;
case CALL_CLEAR_RENDER_TARGET:
break;
case CALL_CLEAR_DEPTH_STENCIL:
@@ -1340,6 +1354,24 @@ dd_context_clear_buffer(struct pipe_context *_pipe, struct pipe_resource *res,
dd_after_draw(dctx, &call);
}
+static void
+dd_context_clear_texture(struct pipe_context *_pipe,
+ struct pipe_resource *res,
+ unsigned level,
+ const struct pipe_box *box,
+ const void *data)
+{
+ struct dd_context *dctx = dd_context(_pipe);
+ struct pipe_context *pipe = dctx->pipe;
+ struct dd_call call;
+
+ call.type = CALL_CLEAR_TEXTURE;
+
+ dd_before_draw(dctx);
+ pipe->clear_texture(pipe, res, level, box, data);
+ dd_after_draw(dctx, &call);
+}
+
void
dd_init_draw_functions(struct dd_context *dctx)
{
@@ -1352,6 +1384,7 @@ dd_init_draw_functions(struct dd_context *dctx)
CTX_INIT(clear_render_target);
CTX_INIT(clear_depth_stencil);
CTX_INIT(clear_buffer);
+ CTX_INIT(clear_texture);
CTX_INIT(flush_resource);
CTX_INIT(generate_mipmap);
}
diff --git a/src/gallium/drivers/ddebug/dd_pipe.h b/src/gallium/drivers/ddebug/dd_pipe.h
index deb1ab73349..deae1f5bc3d 100644
--- a/src/gallium/drivers/ddebug/dd_pipe.h
+++ b/src/gallium/drivers/ddebug/dd_pipe.h
@@ -62,6 +62,7 @@ enum call_type
CALL_FLUSH_RESOURCE,
CALL_CLEAR,
CALL_CLEAR_BUFFER,
+ CALL_CLEAR_TEXTURE,
CALL_CLEAR_RENDER_TARGET,
CALL_CLEAR_DEPTH_STENCIL,
CALL_GENERATE_MIPMAP,