diff --git a/src/vrend_decode.c b/src/vrend_decode.c index 06e2fb6..bc0cc1b 100644 --- a/src/vrend_decode.c +++ b/src/vrend_decode.c @@ -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) { uint32_t shader; - uint32_t index; int nc = (length - 2); if (length < 2) return EINVAL; 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) 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; } diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index ec7f360..632c3c6 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -2714,7 +2714,6 @@ void vrend_bind_vertex_elements_state(struct vrend_context *ctx, void vrend_set_constants(struct vrend_context *ctx, uint32_t shader, - UNUSED uint32_t index, uint32_t num_constant, const float *data) { diff --git a/src/vrend_renderer.h b/src/vrend_renderer.h index ba4bc54..639caaf 100644 --- a/src/vrend_renderer.h +++ b/src/vrend_renderer.h @@ -327,7 +327,6 @@ void vrend_set_min_samples(struct vrend_context *ctx, unsigned min_samples); void vrend_set_constants(struct vrend_context *ctx, uint32_t shader, - uint32_t index, uint32_t num_constant, const float *data);