vrend: remove unused parameter

v2: add comment about that INDEX is not used (Chia-I Wu)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
macos/master
Gert Wollny 4 years ago
parent 4ab4d4ebb5
commit a22c56fff4
  1. 5
      src/vrend_decode.c
  2. 1
      src/vrend_renderer.c
  3. 1
      src/vrend_renderer.h

@ -283,19 +283,18 @@ static int vrend_decode_set_index_buffer(struct vrend_context *ctx, const uint32
static int vrend_decode_set_constant_buffer(struct vrend_context *ctx, const uint32_t *buf, uint32_t length) static int vrend_decode_set_constant_buffer(struct vrend_context *ctx, const uint32_t *buf, uint32_t length)
{ {
uint32_t shader; uint32_t shader;
uint32_t index;
int nc = (length - 2); int nc = (length - 2);
if (length < 2) if (length < 2)
return EINVAL; return EINVAL;
shader = get_buf_entry(buf, VIRGL_SET_CONSTANT_BUFFER_SHADER_TYPE); shader = get_buf_entry(buf, VIRGL_SET_CONSTANT_BUFFER_SHADER_TYPE);
index = get_buf_entry(buf, VIRGL_SET_CONSTANT_BUFFER_INDEX); /* VIRGL_SET_CONSTANT_BUFFER_INDEX is not used */
if (shader >= PIPE_SHADER_TYPES) if (shader >= PIPE_SHADER_TYPES)
return EINVAL; return EINVAL;
vrend_set_constants(ctx, shader, index, nc, get_buf_ptr(buf, VIRGL_SET_CONSTANT_BUFFER_DATA_START)); vrend_set_constants(ctx, shader, nc, get_buf_ptr(buf, VIRGL_SET_CONSTANT_BUFFER_DATA_START));
return 0; return 0;
} }

@ -2714,7 +2714,6 @@ void vrend_bind_vertex_elements_state(struct vrend_context *ctx,
void vrend_set_constants(struct vrend_context *ctx, void vrend_set_constants(struct vrend_context *ctx,
uint32_t shader, uint32_t shader,
UNUSED uint32_t index,
uint32_t num_constant, uint32_t num_constant,
const float *data) const float *data)
{ {

@ -327,7 +327,6 @@ void vrend_set_min_samples(struct vrend_context *ctx, unsigned min_samples);
void vrend_set_constants(struct vrend_context *ctx, void vrend_set_constants(struct vrend_context *ctx,
uint32_t shader, uint32_t shader,
uint32_t index,
uint32_t num_constant, uint32_t num_constant,
const float *data); const float *data);

Loading…
Cancel
Save