mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
freedreno: Pass shader cache key instead of shader key
We are going to need to extend the cache key to add state that effects
the program stateobj, but not necessarily the shader itself (ie. so
ir3_shader_key wouldn't be the correct place to add it).
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
(cherry picked from commit c190356040)
This commit is contained in:
parent
935e5fce5e
commit
9c98620378
7 changed files with 10 additions and 8 deletions
|
|
@ -733,7 +733,7 @@
|
|||
"description": "freedreno: Pass shader cache key instead of shader key",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ fd3_program_create(void *data, struct ir3_shader_variant *bs,
|
|||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs,
|
||||
const struct ir3_shader_key *key) in_dt
|
||||
const struct ir3_cache_key *key) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(data);
|
||||
struct fd3_program_state *state = CALLOC_STRUCT(fd3_program_state);
|
||||
|
|
|
|||
|
|
@ -560,7 +560,7 @@ fd4_program_create(void *data, struct ir3_shader_variant *bs,
|
|||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs,
|
||||
const struct ir3_shader_key *key) in_dt
|
||||
const struct ir3_cache_key *key) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(data);
|
||||
struct fd4_program_state *state = CALLOC_STRUCT(fd4_program_state);
|
||||
|
|
|
|||
|
|
@ -711,7 +711,7 @@ fd5_program_create(void *data, struct ir3_shader_variant *bs,
|
|||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs,
|
||||
const struct ir3_shader_key *key) in_dt
|
||||
const struct ir3_cache_key *key) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(data);
|
||||
struct fd5_program_state *state = CALLOC_STRUCT(fd5_program_state);
|
||||
|
|
|
|||
|
|
@ -351,8 +351,10 @@ next_regid(uint32_t reg, uint32_t increment)
|
|||
static void
|
||||
setup_stateobj(struct fd_ringbuffer *ring, struct fd_context *ctx,
|
||||
struct fd6_program_state *state,
|
||||
const struct ir3_shader_key *key, bool binning_pass) assert_dt
|
||||
const struct ir3_cache_key *cache_key,
|
||||
bool binning_pass) assert_dt
|
||||
{
|
||||
const struct ir3_shader_key *key = &cache_key->key;
|
||||
uint32_t pos_regid, psize_regid, color_regid[8], posz_regid;
|
||||
uint32_t clip0_regid, clip1_regid;
|
||||
uint32_t face_regid, coord_regid, zwcoord_regid, samp_id_regid;
|
||||
|
|
@ -1184,7 +1186,7 @@ fd6_program_create(void *data, struct ir3_shader_variant *bs,
|
|||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs,
|
||||
const struct ir3_shader_key *key) in_dt
|
||||
const struct ir3_cache_key *key) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(data);
|
||||
struct fd6_program_state *state = CALLOC_STRUCT(fd6_program_state);
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ ir3_cache_lookup(struct ir3_cache *cache, const struct ir3_cache_key *key,
|
|||
cache->data, bs, variants[MESA_SHADER_VERTEX],
|
||||
variants[MESA_SHADER_TESS_CTRL], variants[MESA_SHADER_TESS_EVAL],
|
||||
variants[MESA_SHADER_GEOMETRY], variants[MESA_SHADER_FRAGMENT],
|
||||
&key->key);
|
||||
key);
|
||||
state->key = *key;
|
||||
|
||||
/* NOTE: uses copy of key in state obj, because pointer passed by caller
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct ir3_cache_funcs {
|
|||
void *data, struct ir3_shader_variant *bs, /* binning pass vs */
|
||||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs, const struct ir3_shader_key *key);
|
||||
struct ir3_shader_variant *fs, const struct ir3_cache_key *key);
|
||||
void (*destroy_state)(void *data, struct ir3_program_state *state);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue