gallivm/cs: add payload ptr to the cs thread data.
This fits best at a thread level beside shared. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>
This commit is contained in:
@@ -254,6 +254,8 @@ lp_jit_create_cs_types(struct lp_compute_shader_variant *lp)
|
||||
LLVMPointerType(lp_build_format_cache_type(gallivm), 0);
|
||||
|
||||
elem_types[LP_JIT_CS_THREAD_DATA_SHARED] = LLVMPointerType(LLVMInt32TypeInContext(lc), 0);
|
||||
|
||||
elem_types[LP_JIT_CS_THREAD_DATA_PAYLOAD] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
|
||||
thread_data_type = LLVMStructTypeInContext(lc, elem_types,
|
||||
ARRAY_SIZE(elem_types), 0);
|
||||
|
||||
|
||||
@@ -298,12 +298,14 @@ struct lp_jit_cs_thread_data
|
||||
{
|
||||
struct lp_build_format_cache *cache;
|
||||
void *shared;
|
||||
void *payload;
|
||||
};
|
||||
|
||||
|
||||
enum {
|
||||
LP_JIT_CS_THREAD_DATA_CACHE = 0,
|
||||
LP_JIT_CS_THREAD_DATA_SHARED = 1,
|
||||
LP_JIT_CS_THREAD_DATA_PAYLOAD = 2,
|
||||
LP_JIT_CS_THREAD_DATA_COUNT
|
||||
};
|
||||
|
||||
@@ -314,6 +316,9 @@ enum {
|
||||
#define lp_jit_cs_thread_data_shared(_gallivm, _type, _ptr) \
|
||||
lp_build_struct_get2(_gallivm, _type, _ptr, LP_JIT_CS_THREAD_DATA_SHARED, "shared")
|
||||
|
||||
#define lp_jit_cs_thread_data_payload(_gallivm, _type, _ptr) \
|
||||
lp_build_struct_get2(_gallivm, _type, _ptr, LP_JIT_CS_THREAD_DATA_PAYLOAD, "payload")
|
||||
|
||||
|
||||
struct lp_jit_cs_context
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user