llvmpipe/cs: convert cs thread data to opaque friendly api

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
This commit is contained in:
Dave Airlie
2022-09-26 13:00:11 +10:00
parent dd60813657
commit 98efdc449d
4 changed files with 9 additions and 5 deletions
+1
View File
@@ -431,6 +431,7 @@ lp_jit_create_cs_types(struct lp_compute_shader_variant *lp)
thread_data_type = LLVMStructTypeInContext(lc, elem_types,
ARRAY_SIZE(elem_types), 0);
lp->jit_cs_thread_data_type = thread_data_type;
lp->jit_cs_thread_data_ptr_type = LLVMPointerType(thread_data_type, 0);
}
+4 -4
View File
@@ -421,11 +421,11 @@ enum {
};
#define lp_jit_cs_thread_data_cache(_gallivm, _ptr) \
lp_build_struct_get(_gallivm, _ptr, LP_JIT_CS_THREAD_DATA_CACHE, "cache")
#define lp_jit_cs_thread_data_cache(_gallivm, _type, _ptr) \
lp_build_struct_get2(_gallivm, _type, _ptr, LP_JIT_CS_THREAD_DATA_CACHE, "cache")
#define lp_jit_cs_thread_data_shared(_gallivm, _ptr) \
lp_build_struct_get(_gallivm, _ptr, LP_JIT_CS_THREAD_DATA_SHARED, "shared")
#define lp_jit_cs_thread_data_shared(_gallivm, _type, _ptr) \
lp_build_struct_get2(_gallivm, _type, _ptr, LP_JIT_CS_THREAD_DATA_SHARED, "shared")
struct lp_jit_cs_context
+3 -1
View File
@@ -337,7 +337,9 @@ generate_compute(struct llvmpipe_context *lp,
variant->jit_cs_context_type,
context_ptr);
shared_ptr = lp_jit_cs_thread_data_shared(gallivm, thread_data_ptr);
shared_ptr = lp_jit_cs_thread_data_shared(gallivm,
variant->jit_cs_thread_data_type,
thread_data_ptr);
LLVMValueRef coro_num_hdls = LLVMBuildMul(gallivm->builder, num_x_loop, block_y_size_arg, "");
coro_num_hdls = LLVMBuildMul(gallivm->builder, coro_num_hdls, block_z_size_arg, "");
@@ -82,6 +82,7 @@ struct lp_compute_shader_variant
LLVMTypeRef jit_cs_context_type;
LLVMTypeRef jit_cs_context_ptr_type;
LLVMTypeRef jit_cs_thread_data_type;
LLVMTypeRef jit_cs_thread_data_ptr_type;
LLVMValueRef function;