From 29853b7456d125e2f4502cf30b763a3bc30e920b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 10 Jul 2018 08:24:36 +1000 Subject: [PATCH] vrend_decode: use uints for sampler view decode The protocol will never send negative numbers, so use uints to avoid having to compare to 0 and other warnings. Reviewed-by: Po-Hsien Wang --- src/vrend_decode.c | 6 +++--- src/vrend_renderer.c | 2 +- src/vrend_renderer.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vrend_decode.c b/src/vrend_decode.c index 111fc90..2432938 100644 --- a/src/vrend_decode.c +++ b/src/vrend_decode.c @@ -280,10 +280,10 @@ static int vrend_decode_set_vertex_buffers(struct vrend_decode_ctx *ctx, uint16_ static int vrend_decode_set_sampler_views(struct vrend_decode_ctx *ctx, uint16_t length) { - int num_samps; - int i; + uint32_t num_samps; + uint32_t i; uint32_t shader_type; - int32_t start_slot; + uint32_t start_slot; if (length < 2) return EINVAL; diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 30f0bab..416de12 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -2142,7 +2142,7 @@ void vrend_set_num_vbo(struct vrend_context *ctx, void vrend_set_single_sampler_view(struct vrend_context *ctx, uint32_t shader_type, - int index, + uint32_t index, uint32_t handle) { struct vrend_sampler_view *view = NULL; diff --git a/src/vrend_renderer.h b/src/vrend_renderer.h index eda09e4..b2c2fd8 100644 --- a/src/vrend_renderer.h +++ b/src/vrend_renderer.h @@ -227,7 +227,7 @@ void vrend_set_num_sampler_views(struct vrend_context *ctx, int num_sampler_views); void vrend_set_single_sampler_view(struct vrend_context *ctx, uint32_t shader_type, - int index, + uint32_t index, uint32_t res_handle); void vrend_object_bind_blend(struct vrend_context *ctx,