From: Kenneth Graunke Date: Fri, 27 Apr 2018 06:42:16 +0000 (-0700) Subject: iris: proper # of uniforms X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4510098b9c584be592116fb23627be388bf529f9;p=mesa.git iris: proper # of uniforms or at least closer...we were using bytes, we want 256-bit units... --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 941080e5c9a..a5e75fceb90 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2132,8 +2132,9 @@ iris_upload_render_state(struct iris_context *ice, continue; struct iris_shader_state *shs = &ice->shaders.state[stage]; - shs->const_size = cbuf0->buffer_size; - u_upload_data(ice->ctx.const_uploader, 0, shs->const_size, 32, + // XXX: DIV_ROUND_UP(prog_data->nr_params, 8)? + shs->const_size = DIV_ROUND_UP(cbuf0->buffer_size, 32); + u_upload_data(ice->ctx.const_uploader, 0, 32 * shs->const_size, 32, cbuf0->user_buffer, &shs->const_offset, &shs->push_resource); }