zink: add robust_access field to shader key
authorSoroushIMG <soroush.kashani@imgtec.com>
Fri, 20 Jan 2023 16:59:41 +0000 (16:59 +0000)
committerMarge Bot <emma+marge@anholt.net>
Mon, 23 Jan 2023 15:16:01 +0000 (15:16 +0000)
Since shaders can be shared even between robust and non-robust
contexts, the robustness state needs to be tracked.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20808>

src/gallium/drivers/zink/zink_shader_keys.h

index 0e3b764..3a14aeb 100644 (file)
@@ -32,7 +32,8 @@ struct zink_vs_key_base {
    bool clip_halfz : 1;
    bool push_drawid : 1;
    bool last_vertex_stage : 1;
-   uint8_t pad : 5;
+   bool robust_access : 1;
+   uint8_t pad : 4;
 };
 
 struct zink_vs_key {
@@ -81,7 +82,8 @@ struct zink_fs_key {
    /* non-optimal bits after this point */
    bool lower_line_stipple : 1;
    bool lower_line_smooth : 1;
-   uint16_t pad2 : 14;
+   bool robust_access : 1;
+   uint16_t pad2 : 13;
 };
 
 struct zink_tcs_key {
@@ -92,7 +94,8 @@ struct zink_tcs_key {
  * ctx->compute_pipeline_state.key.size is set in zink_context_create.
  */
 struct zink_cs_key {
-   uint32_t pad : 32;
+   bool robust_access : 1;
+   uint32_t pad : 31;
 };
 
 struct zink_shader_key_base {