Mesa (main): iris: Update the clear value in cso_z->packets

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 20 18:02:25 UTC 2021


Module: Mesa
Branch: main
Commit: 78376a450b6230930dc20b31663689d37c12e45c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=78376a450b6230930dc20b31663689d37c12e45c

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Thu Jun 17 09:34:00 2021 -0700

iris: Update the clear value in cso_z->packets

Enables emitting the packets all at once later on.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11454>

---

 src/gallium/drivers/iris/iris_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 7d7795edfb3..75af879273a 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -6276,7 +6276,7 @@ iris_upload_dirty_render_state(struct iris_context *ice,
             clear_value = iris_resource_get_clear_color(zres, NULL, NULL);
       }
 
-      uint32_t clear_params[GENX(3DSTATE_CLEAR_PARAMS_length)];
+      uint32_t *clear_params = cso_z->packets + cso_z_size / 4;
       iris_pack_command(GENX(3DSTATE_CLEAR_PARAMS), clear_params, clear) {
          clear.DepthClearValueValid = true;
          clear.DepthClearValue = clear_value.f32[0];



More information about the mesa-commit mailing list