summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-12-31 07:12:27 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-12-31 07:12:27 +0000
commit051645c92924bf915d82bf219f2ed67309b5577a (patch)
tree4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
parent2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff)
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c')
-rw-r--r--lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
index f91b761dc..c46749dba 100644
--- a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
+++ b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
@@ -579,10 +579,12 @@ lp_build_sample_fetch_image_nearest(struct lp_build_sample_context *bld,
LLVMValueRef rgba8;
struct lp_build_context u8n;
LLVMTypeRef u8n_vec_type;
+ struct lp_type fetch_type;
lp_build_context_init(&u8n, bld->gallivm, lp_type_unorm(8, bld->vector_width));
u8n_vec_type = lp_build_vec_type(bld->gallivm, u8n.type);
+ fetch_type = lp_type_uint(bld->texel_type.width);
if (util_format_is_rgba8_variant(bld->format_desc)) {
/*
* Given the format is a rgba8, just read the pixels as is,
@@ -591,7 +593,7 @@ lp_build_sample_fetch_image_nearest(struct lp_build_sample_context *bld,
rgba8 = lp_build_gather(bld->gallivm,
bld->texel_type.length,
bld->format_desc->block.bits,
- bld->texel_type.width,
+ fetch_type,
TRUE,
data_ptr, offset, TRUE);
@@ -925,14 +927,16 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
LLVMValueRef rgba8;
if (util_format_is_rgba8_variant(bld->format_desc)) {
+ struct lp_type fetch_type;
/*
* Given the format is a rgba8, just read the pixels as is,
* without any swizzling. Swizzling will be done later.
*/
+ fetch_type = lp_type_uint(bld->texel_type.width);
rgba8 = lp_build_gather(bld->gallivm,
bld->texel_type.length,
bld->format_desc->block.bits,
- bld->texel_type.width,
+ fetch_type,
TRUE,
data_ptr, offset[k][j][i], TRUE);