added support for vq compressed YUV422 textures

This commit is contained in:
Anthony Pesch 2017-11-13 23:51:49 -05:00
parent 223b3a5d9a
commit 414c290f80
2 changed files with 8 additions and 7 deletions

View File

@ -462,6 +462,7 @@ define_convert_pal8(ARGB8888, RGBA);
define_convert_vq(ARGB1555, RGBA);
define_convert_vq(RGB565, RGBA);
define_convert_vq(ARGB4444, RGBA);
define_convert_vq(UYVY422, RGBA);
/*
* texture loading
@ -640,10 +641,10 @@ void pvr_tex_decode(const uint8_t *src, int width, int height, int stride,
break;
case PVR_PXL_YUV422:
CHECK(!compressed);
if (twiddled) {
if (compressed) {
convert_vq_UYVY422_RGBA(index, codebook, dst32, width, height);
} else if (twiddled) {
convert_twiddled_UYVY422_RGBA(src16, dst32, width, height);
} else {
convert_bitmap_UYVY422_RGBA(src16, dst32, width, height, stride);
}

View File

@ -256,10 +256,10 @@ EMITTER(FTOI, CONSTRAINTS(REG_I64, REG_F64)) {
switch (RES->type) {
case VALUE_I32: {
/* cvttss2si saturates both underflows and overflows to INT32_MIN, where as
FTOI should saturate underflows to INT32_MIN and overflows to INT32_MAX
due to this difference, the value must be manually clamped beforehand */
/* cvttss2si saturates both underflows and overflows to INT32_MIN, while
OP_FTOI should saturate underflows to INT32_MIN and overflows to
INT32_MAX. due to this difference, the value must be manually clamped
beforehand */
Xbyak::Address min_int32 =
x64_backend_xmm_constant(backend, XMM_CONST_PD_MIN_INT32);
Xbyak::Address max_int32 =