From 414c290f806eefcd21ded4f87cc80e92dd8137d6 Mon Sep 17 00:00:00 2001 From: Anthony Pesch Date: Mon, 13 Nov 2017 23:51:49 -0500 Subject: [PATCH] added support for vq compressed YUV422 textures --- src/guest/pvr/tex.c | 7 ++++--- src/jit/backend/x64/x64_emitters.cc | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/guest/pvr/tex.c b/src/guest/pvr/tex.c index 24f1affd..999e6bf0 100644 --- a/src/guest/pvr/tex.c +++ b/src/guest/pvr/tex.c @@ -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); } diff --git a/src/jit/backend/x64/x64_emitters.cc b/src/jit/backend/x64/x64_emitters.cc index 58b41c80..7ce514ae 100644 --- a/src/jit/backend/x64/x64_emitters.cc +++ b/src/jit/backend/x64/x64_emitters.cc @@ -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 =