diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-20 18:05:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-20 18:55:57 +0100 |
commit | 65fccc149b85968cdce4737266b056059c1510f3 (patch) | |
tree | cf2fc84668743828915138b1a7fb6e2a5202f38c /lib/rendercopy_gen4.c | |
parent | 65cdccdc7bcbb791d791aeeeecb784a382110a3c (diff) |
lib/rendercopy: Fix lack of const throughout gen4 rendercopy
The gen4 code was pushed without being fixed up for the constification
of igt_render_copyfunc_t
../lib/intel_batchbuffer.c: In function ‘igt_get_render_copyfunc’:
../lib/intel_batchbuffer.c:837:8: warning: assignment to ‘igt_render_copyfunc_t’ {aka ‘void (*)(struct intel_batchbuffer *, struct _drm_intel_context *, const struct igt_buf *, unsigned int, unsigned int, unsigned int, unsigned int, const struct igt_buf *, unsigned int, unsigned int)’} from incompatible pointer type ‘void (*)(struct intel_batchbuffer *, drm_intel_context *, struct igt_buf *, unsigned int, unsigned int, unsigned int, unsigned int, struct igt_buf *, unsigned int, unsigned int)’ {aka ‘void (*)(struct intel_batchbuffer *, struct _drm_intel_context *, struct igt_buf *, unsigned int, unsigned int, unsigned int, unsigned int, struct igt_buf *, unsigned int, unsigned int)’} [-Wincompatible-pointer-types]
copy = gen4_render_copyfunc;
Fixes: 61370b2d43db ("lib/rendercopy: Add gen4/5 rendercopy")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib/rendercopy_gen4.c')
-rw-r--r-- | lib/rendercopy_gen4.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/rendercopy_gen4.c b/lib/rendercopy_gen4.c index 5cf150ec..0416b8d6 100644 --- a/lib/rendercopy_gen4.c +++ b/lib/rendercopy_gen4.c @@ -135,7 +135,7 @@ gen4_render_flush(struct intel_batchbuffer *batch, static uint32_t gen4_bind_buf(struct intel_batchbuffer *batch, - struct igt_buf *buf, + const struct igt_buf *buf, uint32_t format, int is_dst) { struct gen4_surface_state *ss; @@ -175,8 +175,8 @@ gen4_bind_buf(struct intel_batchbuffer *batch, static uint32_t gen4_bind_surfaces(struct intel_batchbuffer *batch, - struct igt_buf *src, - struct igt_buf *dst) + const struct igt_buf *src, + const struct igt_buf *dst) { uint32_t *binding_table; @@ -415,7 +415,7 @@ gen4_emit_binding_table(struct intel_batchbuffer *batch, static void gen4_emit_drawing_rectangle(struct intel_batchbuffer *batch, - struct igt_buf *dst) + const struct igt_buf *dst) { OUT_BATCH(GEN4_3DSTATE_DRAWING_RECTANGLE | (4 - 2)); OUT_BATCH(0); @@ -638,9 +638,11 @@ static uint32_t gen4_emit_primitive(struct intel_batchbuffer *batch) void gen4_render_copyfunc(struct intel_batchbuffer *batch, drm_intel_context *context, - struct igt_buf *src, unsigned src_x, unsigned src_y, + const struct igt_buf *src, + unsigned src_x, unsigned src_y, unsigned width, unsigned height, - struct igt_buf *dst, unsigned dst_x, unsigned dst_y) + const struct igt_buf *dst, + unsigned dst_x, unsigned dst_y) { uint32_t cc, cc_vp; uint32_t wm, wm_sampler, wm_kernel, wm_table; |