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 <pwang@chromium.org>
macos/master
Dave Airlie 7 years ago
parent d24ac12d7b
commit 29853b7456
  1. 6
      src/vrend_decode.c
  2. 2
      src/vrend_renderer.c
  3. 2
      src/vrend_renderer.h

@ -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;

@ -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;

@ -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,

Loading…
Cancel
Save