diff options
author | Kenneth Graunke <[email protected]> | 2018-11-09 02:04:23 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:09 -0800 |
commit | c60ce3f4fd8ff4d5e66122c82fd789713d7c1982 (patch) | |
tree | 1d10864068bbbcfc14019439cbd24f64fd310d68 /src/gallium/drivers/iris/iris_state.c | |
parent | 78fc760babe08898746dfde1b5e424a4a4c199fd (diff) |
iris: bypass params and do it ourselves
the backend keeps dead code eliminating them all, so we can't do that,
plus we don't want to because params[] is lame
Diffstat (limited to 'src/gallium/drivers/iris/iris_state.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index dc7021f2d64..353043c0595 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2170,9 +2170,8 @@ upload_uniforms(struct iris_context *ice, struct iris_shader_state *shs = &ice->state.shaders[stage]; struct iris_const_buffer *cbuf = &shs->constbuf[0]; struct iris_compiled_shader *shader = ice->shaders.prog[stage]; - struct brw_stage_prog_data *prog_data = (void *) shader->prog_data; - unsigned upload_size = prog_data->nr_params * sizeof(uint32_t) + + unsigned upload_size = shader->num_system_values * sizeof(uint32_t) + shs->cbuf0.buffer_size; if (upload_size == 0) @@ -2181,11 +2180,11 @@ upload_uniforms(struct iris_context *ice, uint32_t *map = upload_state(ice->ctx.const_uploader, &cbuf->data, upload_size, 64); - for (int i = 0; i < prog_data->nr_params; i++) { - uint32_t param = prog_data->param[i]; + for (int i = 0; i < shader->num_system_values; i++) { + uint32_t sysval = shader->system_values[i]; uint32_t value = 0; - printf("got a param to upload - %u\n", param); + printf("got a param to upload - %u\n", sysval); *map++ = value; } |