summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_format_aos.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_aos.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
index bec2a80d76..cc72a31d72 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
@@ -366,6 +366,8 @@ lp_build_pack_rgba_aos(LLVMBuilderRef builder,
}
+
+
/**
* Fetch a pixel into a 4 float AoS.
*
@@ -429,6 +431,26 @@ lp_build_fetch_rgba_aos(LLVMBuilderRef builder,
return lp_build_unpack_rgba_aos(format_desc, &bld, packed);
}
}
+ else if (format_desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
+ LLVMValueRef packed;
+ LLVMValueRef rgba;
+
+ ptr = LLVMBuildBitCast(builder, ptr,
+ LLVMPointerType(LLVMInt32Type(), 0),
+ "packed_ptr");
+
+ packed = LLVMBuildLoad(builder, ptr, "packed");
+
+ rgba = lp_build_unpack_subsampled_to_rgba_aos(builder, format_desc,
+ 1, packed, i, j);
+
+ lp_build_conv(builder,
+ lp_unorm8_vec4_type(),
+ type,
+ &rgba, 1, &rgba, 1);
+
+ return rgba;
+ }
else if (format_desc->fetch_rgba_float) {
/*
* Fallback to calling util_format_description::fetch_rgba_float.