X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fdraw%2Fdraw_llvm.h;h=a968be01f8177470ad82ce31e7dba441c28c4464;hb=5849e0612cc4c21d213bdb4bd8d0a3f9531cc2b3;hp=f617a29e2e7cf356315484b6d8b3c30b01dd902e;hpb=ea77b384e8c575922eca1c05398e19fcbfda9b09;p=mesa.git diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h index f617a29e2e7..a968be01f81 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.h +++ b/src/gallium/auxiliary/draw/draw_llvm.h @@ -172,7 +172,7 @@ enum { lp_build_struct_get(_gallivm, _ptr, 0, "stride") #define draw_jit_vbuffer_offset(_gallivm, _ptr) \ - lp_build_struct_get(_gallivm, _ptr, 1, "buffer_offset") + lp_build_struct_get(_gallivm, _ptr, 2, "buffer_offset") enum { DRAW_JIT_DVBUFFER_MAP = 0, @@ -261,31 +261,18 @@ enum { -typedef int +typedef boolean (*draw_jit_vert_func)(struct draw_jit_context *context, struct vertex_header *io, const struct draw_vertex_buffer vbuffers[PIPE_MAX_ATTRIBS], - unsigned start, unsigned count, + unsigned start_or_maxelt, unsigned stride, struct pipe_vertex_buffer *vertex_buffers, unsigned instance_id, unsigned vertex_id_offset, - unsigned start_instance); - - -typedef int -(*draw_jit_vert_func_elts)(struct draw_jit_context *context, - struct vertex_header *io, - const struct draw_vertex_buffer vbuffers[PIPE_MAX_ATTRIBS], - const unsigned *fetch_elts, - unsigned fetch_max_elt, - unsigned fetch_count, - unsigned stride, - struct pipe_vertex_buffer *vertex_buffers, - unsigned instance_id, - unsigned vertex_id_offset, - unsigned start_instance); + unsigned start_instance, + const unsigned *fetch_elts); typedef int @@ -311,12 +298,8 @@ struct draw_llvm_variant_key unsigned need_edgeflags:1; unsigned has_gs:1; unsigned num_outputs:8; - /* - * it is important there are no holes in this struct - * (and all padding gets zeroed). - */ unsigned ucp_enable:PIPE_MAX_CLIP_PLANES; - unsigned pad1:24-PIPE_MAX_CLIP_PLANES; + /* note padding here - must use memset */ /* Variable number of vertex elements: */ @@ -332,6 +315,7 @@ struct draw_gs_llvm_variant_key unsigned nr_samplers:8; unsigned nr_sampler_views:8; unsigned num_outputs:8; + /* note padding here - must use memset */ struct draw_sampler_static_state samplers[1]; }; @@ -396,9 +380,7 @@ struct draw_llvm_variant LLVMTypeRef vertex_header_ptr_type; LLVMValueRef function; - LLVMValueRef function_elts; draw_jit_vert_func jit_func; - draw_jit_vert_func_elts jit_func_elts; struct llvm_vertex_shader *shader; @@ -526,11 +508,12 @@ struct lp_build_sampler_soa * draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state); void -draw_llvm_set_sampler_state(struct draw_context *draw, unsigned shader_stage); +draw_llvm_set_sampler_state(struct draw_context *draw, + enum pipe_shader_type shader_stage); void draw_llvm_set_mapped_texture(struct draw_context *draw, - unsigned shader_stage, + enum pipe_shader_type shader_stage, unsigned sview_idx, uint32_t width, uint32_t height, uint32_t depth, uint32_t first_level, uint32_t last_level,