Mesa (main): zink: improve packing for pipeline dynamic state1 info

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 3 01:38:19 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue May 31 15:13:10 2022 -0400

zink: improve packing for pipeline dynamic state1 info

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16838>

---

 src/gallium/drivers/zink/zink_draw.cpp   | 2 +-
 src/gallium/drivers/zink/zink_pipeline.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp
index 1e53cc808ed..7d75579cf23 100644
--- a/src/gallium/drivers/zink/zink_draw.cpp
+++ b/src/gallium/drivers/zink/zink_draw.cpp
@@ -703,7 +703,7 @@ zink_draw(struct pipe_context *pctx,
 
    bool rast_state_changed = ctx->rast_state_changed;
    if (DYNAMIC_STATE != ZINK_NO_DYNAMIC_STATE && (BATCH_CHANGED || rast_state_changed))
-      VKCTX(CmdSetFrontFaceEXT)(batch->state->cmdbuf, ctx->gfx_pipeline_state.dyn_state1.front_face);
+      VKCTX(CmdSetFrontFaceEXT)(batch->state->cmdbuf, (VkFrontFace)ctx->gfx_pipeline_state.dyn_state1.front_face);
    if ((BATCH_CHANGED || rast_state_changed) &&
        screen->info.have_EXT_line_rasterization && rast_state->base.line_stipple_enable)
       VKCTX(CmdSetLineStippleEXT)(batch->state->cmdbuf, rast_state->base.line_stipple_factor, rast_state->base.line_stipple_pattern);
diff --git a/src/gallium/drivers/zink/zink_pipeline.h b/src/gallium/drivers/zink/zink_pipeline.h
index 18b913d474c..9e0d9d7618c 100644
--- a/src/gallium/drivers/zink/zink_pipeline.h
+++ b/src/gallium/drivers/zink/zink_pipeline.h
@@ -55,8 +55,8 @@ struct zink_gfx_pipeline_state {
    bool dirty;
 
    struct {
-      VkFrontFace front_face;
-      unsigned num_viewports;
+      uint8_t front_face; //VkFrontFace:1
+      uint16_t num_viewports;
       struct zink_depth_stencil_alpha_hw_state *depth_stencil_alpha_state; //non-dynamic state
    } dyn_state1;
 



More information about the mesa-commit mailing list