<div dir="ltr">Thanks Dave.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 9, 2018 at 3:25 PM Dave Airlie <<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank">airlied@redhat.com</a>><br>
<br>
The protocol will never send negative numbers, so use uints<br>
to avoid having to compare to 0 and other warnings.<br>
---<br>
src/vrend_decode.c | 6 +++---<br>
src/vrend_renderer.c | 2 +-<br>
src/vrend_renderer.h | 2 +-<br>
3 files changed, 5 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/vrend_decode.c b/src/vrend_decode.c<br>
index d50f385..66069fe 100644<br>
--- a/src/vrend_decode.c<br>
+++ b/src/vrend_decode.c<br>
@@ -280,10 +280,10 @@ static int vrend_decode_set_vertex_buffers(struct vrend_decode_ctx *ctx, uint16_<br>
<br>
static int vrend_decode_set_sampler_views(struct vrend_decode_ctx *ctx, uint16_t length)<br>
{<br>
- int num_samps;<br>
- int i;<br>
+ uint32_t num_samps;<br>
+ uint32_t i;<br>
uint32_t shader_type;<br>
- int32_t start_slot;<br>
+ uint32_t start_slot;<br>
<br>
if (length < 2)<br>
return EINVAL;<br>
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c<br>
index 23494a8..710a56b 100644<br>
--- a/src/vrend_renderer.c<br>
+++ b/src/vrend_renderer.c<br>
@@ -2139,7 +2139,7 @@ void vrend_set_num_vbo(struct vrend_context *ctx,<br>
<br>
void vrend_set_single_sampler_view(struct vrend_context *ctx,<br>
uint32_t shader_type,<br>
- int index,<br>
+ uint32_t index,<br>
uint32_t handle)<br>
{<br>
struct vrend_sampler_view *view = NULL;<br>
diff --git a/src/vrend_renderer.h b/src/vrend_renderer.h<br>
index d07d11c..deb84c1 100644<br>
--- a/src/vrend_renderer.h<br>
+++ b/src/vrend_renderer.h<br>
@@ -227,7 +227,7 @@ void vrend_set_num_sampler_views(struct vrend_context *ctx,<br>
int num_sampler_views);<br>
void vrend_set_single_sampler_view(struct vrend_context *ctx,<br>
uint32_t shader_type,<br>
- int index,<br>
+ uint32_t index,<br>
uint32_t res_handle);<br>
<br>
void vrend_object_bind_blend(struct vrend_context *ctx,<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
virglrenderer-devel mailing list<br>
<a href="mailto:virglrenderer-devel@lists.freedesktop.org" target="_blank">virglrenderer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel</a><br>
</blockquote></div>