mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 06:00:10 +01:00
llvmpipe/jit: pass fragment sample mask via jit context.
The incoming sample mask for the fragment shader can be passed via the jit context Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
This commit is contained in:
parent
0a6150251a
commit
c070af8511
2 changed files with 10 additions and 0 deletions
|
|
@ -226,6 +226,7 @@ lp_jit_create_types(struct lp_fragment_shader_variant *lp)
|
|||
elem_types[LP_JIT_CTX_IMAGES] = LLVMArrayType(image_type,
|
||||
PIPE_MAX_SHADER_IMAGES);
|
||||
elem_types[LP_JIT_CTX_ALPHA_REF] = LLVMFloatTypeInContext(lc);
|
||||
elem_types[LP_JIT_CTX_SAMPLE_MASK] =
|
||||
elem_types[LP_JIT_CTX_STENCIL_REF_FRONT] =
|
||||
elem_types[LP_JIT_CTX_STENCIL_REF_BACK] = LLVMInt32TypeInContext(lc);
|
||||
elem_types[LP_JIT_CTX_U8_BLEND_COLOR] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
|
||||
|
|
@ -277,6 +278,9 @@ lp_jit_create_types(struct lp_fragment_shader_variant *lp)
|
|||
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, num_ssbos,
|
||||
gallivm->target, context_type,
|
||||
LP_JIT_CTX_NUM_SSBOS);
|
||||
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, sample_mask,
|
||||
gallivm->target, context_type,
|
||||
LP_JIT_CTX_SAMPLE_MASK);
|
||||
LP_CHECK_STRUCT_SIZE(struct lp_jit_context,
|
||||
gallivm->target, context_type);
|
||||
|
||||
|
|
|
|||
|
|
@ -166,6 +166,8 @@ struct lp_jit_context
|
|||
|
||||
const uint32_t *ssbos[LP_MAX_TGSI_SHADER_BUFFERS];
|
||||
int num_ssbos[LP_MAX_TGSI_SHADER_BUFFERS];
|
||||
|
||||
uint32_t sample_mask;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -187,6 +189,7 @@ enum {
|
|||
LP_JIT_CTX_VIEWPORTS,
|
||||
LP_JIT_CTX_SSBOS,
|
||||
LP_JIT_CTX_NUM_SSBOS,
|
||||
LP_JIT_CTX_SAMPLE_MASK,
|
||||
LP_JIT_CTX_COUNT
|
||||
};
|
||||
|
||||
|
|
@ -230,6 +233,9 @@ enum {
|
|||
#define lp_jit_context_num_ssbos(_gallivm, _ptr) \
|
||||
lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_NUM_SSBOS, "num_ssbos")
|
||||
|
||||
#define lp_jit_context_sample_mask(_gallivm, _ptr) \
|
||||
lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_SAMPLE_MASK, "sample_mask")
|
||||
|
||||
struct lp_jit_thread_data
|
||||
{
|
||||
struct lp_build_format_cache *cache;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue