On 02/07/2016 11:39 PM, Ilia Mirkin wrote:
On Sun, Feb 7, 2016 at 5:32 PM, Samuel Pitoiset
<[email protected]> wrote:
This fixes a crash with bin/arb_clear_texture-base-formats and
probably some other tests which use clear_texture().
Signed-off-by: Samuel Pitoiset <[email protected]>
---
src/gallium/drivers/trace/tr_context.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/src/gallium/drivers/trace/tr_context.c
b/src/gallium/drivers/trace/tr_context.c
index 2280898..c49e4f2 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1325,6 +1325,35 @@ trace_context_clear_depth_stencil(struct pipe_context
*_pipe,
}
static inline void
+trace_context_clear_texture(struct pipe_context *_pipe,
+ struct pipe_resource *_res,
+ unsigned level,
+ const struct pipe_box *box,
+ const void *data)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+ struct trace_resource *tr_res = trace_resource(_res);
+ struct pipe_resource *res = tr_res->resource;
I guess it might be nicer to use trace_resource_unwrap here?
Right.
+
+ trace_dump_call_begin("pipe_context", "clear_texture");
+
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg_begin("res");
Is this begin/end thing necessary here?
With trace_dump_resource_ptr() it's necessary, but I can use
trace_dump_arg(ptr, res) which does the same job actually.
With the two things above fixed or otherwise addressed, this is
Reviewed-by: Ilia Mirkin <[email protected]>
+ trace_dump_resource_ptr(_res);
+ trace_dump_arg_end();
+ trace_dump_arg(uint, level);
+ trace_dump_arg_begin("box");
+ trace_dump_box(box);
+ trace_dump_arg_end();
+ trace_dump_arg(ptr, data);
+
+ pipe->clear_texture(pipe, res, level, box, data);
+
+ trace_dump_call_end();
+}
+
+static inline void
trace_context_flush(struct pipe_context *_pipe,
struct pipe_fence_handle **fence,
unsigned flags)
@@ -1778,6 +1807,7 @@ trace_context_create(struct trace_screen *tr_scr,
TR_CTX_INIT(clear);
TR_CTX_INIT(clear_render_target);
TR_CTX_INIT(clear_depth_stencil);
+ TR_CTX_INIT(clear_texture);
TR_CTX_INIT(flush);
TR_CTX_INIT(generate_mipmap);
TR_CTX_INIT(texture_barrier);
--
2.6.4
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev