mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
zink: add a define for testing that an optimal key is the default
tcs values here are ignored since they only matter for generated tcs
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21169>
(cherry picked from commit 7c021cc5f0)
This commit is contained in:
parent
3024083f5d
commit
1001fa6aaf
2 changed files with 12 additions and 2 deletions
|
|
@ -553,7 +553,7 @@
|
|||
"description": "zink: add a define for testing that an optimal key is the default",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 3,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
@ -11015,4 +11015,4 @@
|
|||
"main_sha": null,
|
||||
"because_sha": null
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
|||
|
|
@ -129,6 +129,16 @@ union zink_shader_key_optimal {
|
|||
|
||||
/* the default key has only last_vertex_stage set*/
|
||||
#define ZINK_SHADER_KEY_OPTIMAL_DEFAULT (1<<0)
|
||||
/* Ignore patch_vertices bits that would only be used if we had to generate the missing TCS */
|
||||
static inline uint32_t
|
||||
zink_shader_key_optimal_no_tcs(uint32_t key)
|
||||
{
|
||||
union zink_shader_key_optimal k;
|
||||
k.val = key;
|
||||
k.tcs_bits = 0;
|
||||
return k.val;
|
||||
}
|
||||
#define ZINK_SHADER_KEY_OPTIMAL_IS_DEFAULT(key) (zink_shader_key_optimal_no_tcs(key) == ZINK_SHADER_KEY_OPTIMAL_DEFAULT)
|
||||
|
||||
static inline const struct zink_fs_key_base *
|
||||
zink_fs_key_base(const struct zink_shader_key *key)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue