iris: make KSP helper available outside iris_state.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
This commit is contained in:
Lionel Landwerlin 2023-12-20 16:50:49 +02:00 committed by Marge Bot
parent bde1c76655
commit 84e1f8ae70
2 changed files with 7 additions and 7 deletions

View file

@ -560,6 +560,13 @@ struct iris_compiled_shader {
uint8_t derived_data[0];
};
static inline uint64_t
KSP(const struct iris_compiled_shader *shader)
{
struct iris_resource *res = (void *) shader->assembly.res;
return iris_bo_offset_from_base_address(res->bo) + shader->assembly.offset;
}
/**
* API context state that is replicated per shader stage.
*/

View file

@ -4877,13 +4877,6 @@ iris_populate_cs_key(const struct iris_context *ice,
{
}
static uint64_t
KSP(const struct iris_compiled_shader *shader)
{
struct iris_resource *res = (void *) shader->assembly.res;
return iris_bo_offset_from_base_address(res->bo) + shader->assembly.offset;
}
static uint32_t
encode_sampler_count(const struct iris_compiled_shader *shader)
{