uint32_t width, uint32_t height, uint32_t depth,
const void *base_ptr,
uint32_t row_stride,
- uint32_t img_stride)
+ uint32_t img_stride,
+ uint32_t num_samples,
+ uint32_t sample_stride)
{
#ifdef LLVM_AVAILABLE
if (draw->llvm)
idx,
width, height, depth,
base_ptr,
- row_stride, img_stride);
+ row_stride, img_stride,
+ num_samples, sample_stride);
#endif
}
uint32_t width, uint32_t height, uint32_t depth,
const void *base_ptr,
uint32_t row_stride,
- uint32_t img_stride);
+ uint32_t img_stride,
+ uint32_t num_samples,
+ uint32_t sample_stride);
/*
* Vertex shader functions
elem_types[DRAW_JIT_IMAGE_HEIGHT] =
elem_types[DRAW_JIT_IMAGE_DEPTH] =
elem_types[DRAW_JIT_IMAGE_ROW_STRIDE] =
- elem_types[DRAW_JIT_IMAGE_IMG_STRIDE] = int32_type;
+ elem_types[DRAW_JIT_IMAGE_IMG_STRIDE] =
+ elem_types[DRAW_JIT_IMAGE_NUM_SAMPLES] =
+ elem_types[DRAW_JIT_IMAGE_SAMPLE_STRIDE] = int32_type;
elem_types[DRAW_JIT_IMAGE_BASE] =
LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0);
LP_CHECK_MEMBER_OFFSET(struct draw_jit_image, img_stride,
target, image_type,
DRAW_JIT_IMAGE_IMG_STRIDE);
+ LP_CHECK_MEMBER_OFFSET(struct draw_jit_image, num_samples,
+ target, image_type,
+ DRAW_JIT_IMAGE_NUM_SAMPLES);
+ LP_CHECK_MEMBER_OFFSET(struct draw_jit_image, sample_stride,
+ target, image_type,
+ DRAW_JIT_IMAGE_SAMPLE_STRIDE);
LP_CHECK_STRUCT_SIZE(struct draw_jit_image, target, image_type);
uint32_t width, uint32_t height, uint32_t depth,
const void *base_ptr,
uint32_t row_stride,
- uint32_t img_stride)
+ uint32_t img_stride,
+ uint32_t num_samples,
+ uint32_t sample_stride)
{
struct draw_jit_image *jit_image;
jit_image->row_stride = row_stride;
jit_image->img_stride = img_stride;
+ jit_image->num_samples = num_samples;
+ jit_image->sample_stride = sample_stride;
}
const void *base;
uint32_t row_stride;
uint32_t img_stride;
+ uint32_t num_samples;
+ uint32_t sample_stride;
};
enum {
DRAW_JIT_IMAGE_BASE,
DRAW_JIT_IMAGE_ROW_STRIDE,
DRAW_JIT_IMAGE_IMG_STRIDE,
+ DRAW_JIT_IMAGE_NUM_SAMPLES,
+ DRAW_JIT_IMAGE_SAMPLE_STRIDE,
DRAW_JIT_IMAGE_NUM_FIELDS /* number of fields above */
};
uint32_t width, uint32_t height, uint32_t depth,
const void *base_ptr,
uint32_t row_stride,
- uint32_t img_stride);
+ uint32_t img_stride,
+ uint32_t num_samples,
+ uint32_t sample_stride);
#endif
DRAW_LLVM_IMAGE_MEMBER(base_ptr, DRAW_JIT_IMAGE_BASE, TRUE)
DRAW_LLVM_IMAGE_MEMBER(row_stride, DRAW_JIT_IMAGE_ROW_STRIDE, TRUE)
DRAW_LLVM_IMAGE_MEMBER(img_stride, DRAW_JIT_IMAGE_IMG_STRIDE, TRUE)
+DRAW_LLVM_IMAGE_MEMBER(num_samples, DRAW_JIT_IMAGE_NUM_SAMPLES, TRUE)
+DRAW_LLVM_IMAGE_MEMBER(sample_stride, DRAW_JIT_IMAGE_SAMPLE_STRIDE, TRUE)
static void
draw_llvm_sampler_soa_destroy(struct lp_build_sampler_soa *sampler)
image->dynamic_state.base.base_ptr = draw_llvm_image_base_ptr;
image->dynamic_state.base.row_stride = draw_llvm_image_row_stride;
image->dynamic_state.base.img_stride = draw_llvm_image_img_stride;
+ image->dynamic_state.base.num_samples = draw_llvm_image_num_samples;
+ image->dynamic_state.base.sample_stride = draw_llvm_image_sample_stride;
image->dynamic_state.static_state = static_state;
i,
width, height, num_layers,
addr,
- row_stride, img_stride);
+ row_stride, img_stride, 0, 0);
}
}
}
}
draw_set_mapped_image(draw, PIPE_SHADER_VERTEX, i, width, height,
- num_layers, addr, row_stride, img_stride);
+ num_layers, addr, row_stride, img_stride, 0, 0);
}
draw_set_images(draw, PIPE_SHADER_VERTEX, images, prog->info.num_images);
/* unmap images */
for (unsigned i = 0; i < prog->info.num_images; i++) {
if (img_transfer[i]) {
- draw_set_mapped_image(draw, PIPE_SHADER_VERTEX, i, 0, 0, 0, NULL, 0, 0);
+ draw_set_mapped_image(draw, PIPE_SHADER_VERTEX, i, 0, 0, 0, NULL, 0, 0, 0, 0);
pipe_transfer_unmap(pipe, img_transfer[i]);
}
}