diff options
author | Kenneth Graunke <[email protected]> | 2019-09-18 20:12:33 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-09-18 22:50:52 -0700 |
commit | 6841f11d1417c15f96276aaf53b92d0f5c998865 (patch) | |
tree | 396d901cdc2818b2e83f565d9871bc48b7bdc952 /src/gallium/drivers/iris/iris_draw.c | |
parent | ddd314f0cecb89004980618ac40171a079f324fe (diff) |
iris: Use state_refs for draw parameters.
iris_state_ref is a <resource, offset> tuple, which is exactly what we
need here.
Diffstat (limited to 'src/gallium/drivers/iris/iris_draw.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_draw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index fc2c14eab7f..005da3f7a6d 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -114,9 +114,9 @@ iris_update_draw_parameters(struct iris_context *ice, const struct pipe_draw_info *info) { if (info->indirect) { - pipe_resource_reference(&ice->draw.draw_params_res, + pipe_resource_reference(&ice->draw.draw_params.res, info->indirect->buffer); - ice->draw.draw_params_offset = info->indirect->offset + + ice->draw.draw_params.offset = info->indirect->offset + (info->index_size ? 12 : 8); ice->draw.params.firstvertex = 0; ice->draw.params.baseinstance = 0; @@ -127,8 +127,8 @@ iris_update_draw_parameters(struct iris_context *ice, ice->draw.params.firstvertex != (info->index_size ? info->index_bias : info->start) || (ice->draw.params.baseinstance != info->start_instance)) { - pipe_resource_reference(&ice->draw.draw_params_res, NULL); - ice->draw.draw_params_offset = 0; + pipe_resource_reference(&ice->draw.draw_params.res, NULL); + ice->draw.draw_params.offset = 0; ice->draw.params.firstvertex = info->index_size ? info->index_bias : info->start; ice->draw.params.baseinstance = info->start_instance; |