mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Second and final pass of clearing out tabs.
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
#define BPMEM_FIELDMASK 0x44
|
||||
#define BPMEM_SETDRAWDONE 0x45
|
||||
#define BPMEM_BUSCLOCK0 0x46
|
||||
#define BPMEM_PE_TOKEN_ID 0x47
|
||||
#define BPMEM_PE_TOKEN_ID 0x47
|
||||
#define BPMEM_PE_TOKEN_INT_ID 0x48
|
||||
#define BPMEM_EFB_TL 0x49
|
||||
#define BPMEM_EFB_BR 0x4A
|
||||
|
@ -31,8 +31,8 @@ int et_UpdateInterrupts;
|
||||
// STATE_TO_SAVE
|
||||
SCPFifoStruct fifo;
|
||||
UCPStatusReg m_CPStatusReg;
|
||||
UCPCtrlReg m_CPCtrlReg;
|
||||
UCPClearReg m_CPClearReg;
|
||||
UCPCtrlReg m_CPCtrlReg;
|
||||
UCPClearReg m_CPClearReg;
|
||||
|
||||
u16 m_bboxleft;
|
||||
u16 m_bboxtop;
|
||||
@ -541,11 +541,11 @@ void SetCpControlRegister()
|
||||
// We don't emulate proper GP timing anyway at the moment, so this code would just slow down emulation.
|
||||
void SetCpClearRegister()
|
||||
{
|
||||
// if (IsOnThread())
|
||||
// {
|
||||
// if (!m_CPClearReg.ClearFifoUnderflow && m_CPClearReg.ClearFifoOverflow)
|
||||
// bProcessFifoToLoWatermark = true;
|
||||
// }
|
||||
// if (IsOnThread())
|
||||
// {
|
||||
// if (!m_CPClearReg.ClearFifoUnderflow && m_CPClearReg.ClearFifoOverflow)
|
||||
// bProcessFifoToLoWatermark = true;
|
||||
// }
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
@ -58,7 +58,7 @@ void GFXDebuggerCheckAndPause(bool update)
|
||||
{
|
||||
g_video_backend->UpdateFPSDisplay("Paused by Video Debugger");
|
||||
|
||||
if (update) GFXDebuggerUpdateScreen();
|
||||
if (update) GFXDebuggerUpdateScreen();
|
||||
SLEEP(5);
|
||||
}
|
||||
g_pdebugger->OnContinue();
|
||||
|
@ -32,10 +32,10 @@ namespace DriverDetails
|
||||
const u32 m_os = OS_ALL | OS_LINUX;
|
||||
#endif
|
||||
|
||||
Vendor m_vendor = VENDOR_UNKNOWN;
|
||||
Driver m_driver = DRIVER_UNKNOWN;
|
||||
s32 m_family = 0;
|
||||
double m_version = 0.0;
|
||||
Vendor m_vendor = VENDOR_UNKNOWN;
|
||||
Driver m_driver = DRIVER_UNKNOWN;
|
||||
s32 m_family = 0;
|
||||
double m_version = 0.0;
|
||||
|
||||
// This is a list of all known bugs for each vendor
|
||||
// We use this to check if the device and driver has a issue
|
||||
|
@ -3,7 +3,7 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
//DL facts:
|
||||
// Ikaruga uses (nearly) NO display lists!
|
||||
// Ikaruga uses (nearly) NO display lists!
|
||||
// Zelda WW uses TONS of display lists
|
||||
// Zelda TP uses almost 100% display lists except menus (we like this!)
|
||||
// Super Mario Galaxy has nearly all geometry and more than half of the state in DLs (great!)
|
||||
|
@ -221,13 +221,13 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||
MMIO::ComplexWrite<u16>([](u32, u16 val) {
|
||||
UPECtrlReg tmpCtrl(val);
|
||||
|
||||
if (tmpCtrl.PEToken) g_bSignalTokenInterrupt = 0;
|
||||
if (tmpCtrl.PEFinish) g_bSignalFinishInterrupt = 0;
|
||||
if (tmpCtrl.PEToken) g_bSignalTokenInterrupt = 0;
|
||||
if (tmpCtrl.PEFinish) g_bSignalFinishInterrupt = 0;
|
||||
|
||||
m_Control.PETokenEnable = tmpCtrl.PETokenEnable;
|
||||
m_Control.PEFinishEnable = tmpCtrl.PEFinishEnable;
|
||||
m_Control.PEToken = 0; // this flag is write only
|
||||
m_Control.PEFinish = 0; // this flag is write only
|
||||
m_Control.PEToken = 0; // this flag is write only
|
||||
m_Control.PEFinish = 0; // this flag is write only
|
||||
|
||||
DEBUG_LOG(PIXELENGINE, "(w16) CTRL_REGISTER: 0x%04x", val);
|
||||
UpdateInterrupts();
|
||||
@ -280,8 +280,8 @@ void UpdateFinishInterrupt(bool active)
|
||||
}
|
||||
|
||||
// TODO(mb2): Refactor SetTokenINT_OnMainThread(u64 userdata, int cyclesLate).
|
||||
// Think about the right order between tokenVal and tokenINT... one day maybe.
|
||||
// Cleanup++
|
||||
// Think about the right order between tokenVal and tokenINT... one day maybe.
|
||||
// Cleanup++
|
||||
|
||||
// Called only if BPMEM_PE_TOKEN_INT_ID is ack by GP
|
||||
void SetToken_OnMainThread(u64 userdata, int cyclesLate)
|
||||
|
@ -21,18 +21,18 @@
|
||||
#define I_PMATERIALS "cPmtrl"
|
||||
|
||||
// TODO: get rid of them as they aren't used
|
||||
#define C_COLORMATRIX 0 // 0
|
||||
#define C_COLORS 0 // 0
|
||||
#define C_KCOLORS (C_COLORS + 4) // 4
|
||||
#define C_ALPHA (C_KCOLORS + 4) // 8
|
||||
#define C_TEXDIMS (C_ALPHA + 1) // 9
|
||||
#define C_ZBIAS (C_TEXDIMS + 8) //17
|
||||
#define C_INDTEXSCALE (C_ZBIAS + 2) //19
|
||||
#define C_INDTEXMTX (C_INDTEXSCALE + 2) //21
|
||||
#define C_FOG (C_INDTEXMTX + 6) //27
|
||||
#define C_COLORMATRIX 0 // 0
|
||||
#define C_COLORS 0 // 0
|
||||
#define C_KCOLORS (C_COLORS + 4) // 4
|
||||
#define C_ALPHA (C_KCOLORS + 4) // 8
|
||||
#define C_TEXDIMS (C_ALPHA + 1) // 9
|
||||
#define C_ZBIAS (C_TEXDIMS + 8) //17
|
||||
#define C_INDTEXSCALE (C_ZBIAS + 2) //19
|
||||
#define C_INDTEXMTX (C_INDTEXSCALE + 2) //21
|
||||
#define C_FOG (C_INDTEXMTX + 6) //27
|
||||
|
||||
#define C_PLIGHTS (C_FOG + 3)
|
||||
#define C_PMATERIALS (C_PLIGHTS + 40)
|
||||
#define C_PLIGHTS (C_FOG + 3)
|
||||
#define C_PMATERIALS (C_PLIGHTS + 40)
|
||||
#define C_PENVCONST_END (C_PMATERIALS + 4)
|
||||
|
||||
// Different ways to achieve rendering with destination alpha
|
||||
|
@ -441,7 +441,7 @@ void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height)
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Crop the picture from 4:3 to 5:4 or from 16:9 to 16:10.
|
||||
// Output: FloatGLWidth, FloatGLHeight, FloatXOffset, FloatYOffset
|
||||
// Output: FloatGLWidth, FloatGLHeight, FloatXOffset, FloatYOffset
|
||||
// ------------------
|
||||
if (g_ActiveConfig.iAspectRatio != ASPECT_STRETCH && g_ActiveConfig.bCrop)
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ public:
|
||||
{
|
||||
// TODO: Not ready for usage yet
|
||||
return true;
|
||||
// return constant_usage[index];
|
||||
//return constant_usage[index];
|
||||
}
|
||||
private:
|
||||
std::vector<bool> constant_usage; // TODO: Is vector<bool> appropriate here?
|
||||
|
@ -130,7 +130,7 @@ void TextureCache::Cleanup()
|
||||
TexCache::iterator tcend = textures.end();
|
||||
while (iter != tcend)
|
||||
{
|
||||
if ( frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount
|
||||
if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount
|
||||
|
||||
// EFB copies living on the host GPU are unrecoverable and thus shouldn't be deleted
|
||||
&& ! iter->second->IsEfbCopy() )
|
||||
@ -378,12 +378,12 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage,
|
||||
tlut_hash = GetHash64(&texMem[tlutaddr], palette_size, g_ActiveConfig.iSafeTextureCache_ColorSamples);
|
||||
|
||||
// NOTE: For non-paletted textures, texID is equal to the texture address.
|
||||
// A paletted texture, however, may have multiple texIDs assigned though depending on the currently used tlut.
|
||||
// This (changing texID depending on the tlut_hash) is a trick to get around
|
||||
// an issue with Metroid Prime's fonts (it has multiple sets of fonts on each other
|
||||
// stored in a single texture and uses the palette to make different characters
|
||||
// visible or invisible. Thus, unless we want to recreate the textures for every drawn character,
|
||||
// we must make sure that a paletted texture gets assigned multiple IDs for each tlut used.
|
||||
// A paletted texture, however, may have multiple texIDs assigned though depending on the currently used tlut.
|
||||
// This (changing texID depending on the tlut_hash) is a trick to get around
|
||||
// an issue with Metroid Prime's fonts (it has multiple sets of fonts on each other
|
||||
// stored in a single texture and uses the palette to make different characters
|
||||
// visible or invisible. Thus, unless we want to recreate the textures for every drawn character,
|
||||
// we must make sure that a paletted texture gets assigned multiple IDs for each tlut used.
|
||||
//
|
||||
// TODO: Because texID isn't always the same as the address now, CopyRenderTargetToTexture might be broken now
|
||||
texID ^= ((u32)tlut_hash) ^(u32)(tlut_hash >> 32);
|
||||
@ -579,40 +579,40 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
||||
// Emulation methods:
|
||||
//
|
||||
// - EFB to RAM:
|
||||
// Encodes the requested EFB data at its native resolution to the emulated RAM using shaders.
|
||||
// Load() decodes the data from there again (using TextureDecoder) if the EFB copy is being used as a texture again.
|
||||
// Advantage: CPU can read data from the EFB copy and we don't lose any important updates to the texture
|
||||
// Disadvantage: Encoding+decoding steps often are redundant because only some games read or modify EFB copies before using them as textures.
|
||||
// Encodes the requested EFB data at its native resolution to the emulated RAM using shaders.
|
||||
// Load() decodes the data from there again (using TextureDecoder) if the EFB copy is being used as a texture again.
|
||||
// Advantage: CPU can read data from the EFB copy and we don't lose any important updates to the texture
|
||||
// Disadvantage: Encoding+decoding steps often are redundant because only some games read or modify EFB copies before using them as textures.
|
||||
//
|
||||
// - EFB to texture:
|
||||
// Copies the requested EFB data to a texture object in VRAM, performing any color conversion using shaders.
|
||||
// Advantage: Works for many games, since in most cases EFB copies aren't read or modified at all before being used as a texture again.
|
||||
// Since we don't do any further encoding or decoding here, this method is much faster.
|
||||
// It also allows enhancing the visual quality by doing scaled EFB copies.
|
||||
// Copies the requested EFB data to a texture object in VRAM, performing any color conversion using shaders.
|
||||
// Advantage: Works for many games, since in most cases EFB copies aren't read or modified at all before being used as a texture again.
|
||||
// Since we don't do any further encoding or decoding here, this method is much faster.
|
||||
// It also allows enhancing the visual quality by doing scaled EFB copies.
|
||||
//
|
||||
// - Hybrid EFB copies:
|
||||
// 1a) Whenever this function gets called, encode the requested EFB data to RAM (like EFB to RAM)
|
||||
// 1b) Set type to TCET_EC_DYNAMIC for all texture cache entries in the destination address range.
|
||||
// If EFB copy caching is enabled, further checks will (try to) prevent redundant EFB copies.
|
||||
// 2) Check if a texture cache entry for the specified dstAddr already exists (i.e. if an EFB copy was triggered to that address before):
|
||||
// 2a) Entry doesn't exist:
|
||||
// - Also copy the requested EFB data to a texture object in VRAM (like EFB to texture)
|
||||
// - Create a texture cache entry for the target (type = TCET_EC_VRAM)
|
||||
// - Store a hash of the encoded RAM data in the texcache entry.
|
||||
// 2b) Entry exists AND type is TCET_EC_VRAM:
|
||||
// - Like case 2a, but reuse the old texcache entry instead of creating a new one.
|
||||
// 2c) Entry exists AND type is TCET_EC_DYNAMIC:
|
||||
// - Only encode the texture to RAM (like EFB to RAM) and store a hash of the encoded data in the existing texcache entry.
|
||||
// - Do NOT copy the requested EFB data to a VRAM object. Reason: the texture is dynamic, i.e. the CPU is modifying it. Storing a VRAM copy is useless, because we'd always end up deleting it and reloading the data from RAM anyway.
|
||||
// 3) If the EFB copy gets used as a texture, compare the source RAM hash with the hash you stored when encoding the EFB data to RAM.
|
||||
// 3a) If the two hashes match AND type is TCET_EC_VRAM, reuse the VRAM copy you created
|
||||
// 3b) If the two hashes differ AND type is TCET_EC_VRAM, screw your existing VRAM copy. Set type to TCET_EC_DYNAMIC.
|
||||
// Redecode the source RAM data to a VRAM object. The entry basically behaves like a normal texture now.
|
||||
// 3c) If type is TCET_EC_DYNAMIC, treat the EFB copy like a normal texture.
|
||||
// Advantage: Non-dynamic EFB copies can be visually enhanced like with EFB to texture.
|
||||
// Compatibility is as good as EFB to RAM.
|
||||
// Disadvantage: Slower than EFB to texture and often even slower than EFB to RAM.
|
||||
// EFB copy cache depends on accurate texture hashing being enabled. However, with accurate hashing you end up being as slow as without a copy cache anyway.
|
||||
// 1a) Whenever this function gets called, encode the requested EFB data to RAM (like EFB to RAM)
|
||||
// 1b) Set type to TCET_EC_DYNAMIC for all texture cache entries in the destination address range.
|
||||
// If EFB copy caching is enabled, further checks will (try to) prevent redundant EFB copies.
|
||||
// 2) Check if a texture cache entry for the specified dstAddr already exists (i.e. if an EFB copy was triggered to that address before):
|
||||
// 2a) Entry doesn't exist:
|
||||
// - Also copy the requested EFB data to a texture object in VRAM (like EFB to texture)
|
||||
// - Create a texture cache entry for the target (type = TCET_EC_VRAM)
|
||||
// - Store a hash of the encoded RAM data in the texcache entry.
|
||||
// 2b) Entry exists AND type is TCET_EC_VRAM:
|
||||
// - Like case 2a, but reuse the old texcache entry instead of creating a new one.
|
||||
// 2c) Entry exists AND type is TCET_EC_DYNAMIC:
|
||||
// - Only encode the texture to RAM (like EFB to RAM) and store a hash of the encoded data in the existing texcache entry.
|
||||
// - Do NOT copy the requested EFB data to a VRAM object. Reason: the texture is dynamic, i.e. the CPU is modifying it. Storing a VRAM copy is useless, because we'd always end up deleting it and reloading the data from RAM anyway.
|
||||
// 3) If the EFB copy gets used as a texture, compare the source RAM hash with the hash you stored when encoding the EFB data to RAM.
|
||||
// 3a) If the two hashes match AND type is TCET_EC_VRAM, reuse the VRAM copy you created
|
||||
// 3b) If the two hashes differ AND type is TCET_EC_VRAM, screw your existing VRAM copy. Set type to TCET_EC_DYNAMIC.
|
||||
// Redecode the source RAM data to a VRAM object. The entry basically behaves like a normal texture now.
|
||||
// 3c) If type is TCET_EC_DYNAMIC, treat the EFB copy like a normal texture.
|
||||
// Advantage: Non-dynamic EFB copies can be visually enhanced like with EFB to texture.
|
||||
// Compatibility is as good as EFB to RAM.
|
||||
// Disadvantage: Slower than EFB to texture and often even slower than EFB to RAM.
|
||||
// EFB copy cache depends on accurate texture hashing being enabled. However, with accurate hashing you end up being as slow as without a copy cache anyway.
|
||||
//
|
||||
// Disadvantage of all methods: Calling this function requires the GPU to perform a pipeline flush which stalls any further CPU processing.
|
||||
//
|
||||
|
@ -21,8 +21,8 @@ public:
|
||||
enum TexCacheEntryType
|
||||
{
|
||||
TCET_NORMAL,
|
||||
TCET_EC_VRAM, // EFB copy which sits in VRAM and is ready to be used
|
||||
TCET_EC_DYNAMIC, // EFB copy which sits in RAM and needs to be decoded before being used
|
||||
TCET_EC_VRAM, // EFB copy which sits in VRAM and is ready to be used
|
||||
TCET_EC_DYNAMIC, // EFB copy which sits in RAM and needs to be decoded before being used
|
||||
};
|
||||
|
||||
struct TCacheEntryBase
|
||||
@ -94,7 +94,7 @@ public:
|
||||
static void Invalidate();
|
||||
static void InvalidateRange(u32 start_address, u32 size);
|
||||
static void MakeRangeDynamic(u32 start_address, u32 size);
|
||||
static void ClearRenderTargets(); // currently only used by OGL
|
||||
static void ClearRenderTargets(); // currently only used by OGL
|
||||
static bool Find(u32 start_address, u64 hash);
|
||||
|
||||
virtual TCacheEntryBase* CreateTexture(unsigned int width, unsigned int height,
|
||||
|
@ -1468,25 +1468,25 @@ PC_TexFormat TexDecoder_DecodeRGBA8FromTmem(u8* dst, const u8 *src_ar, const u8
|
||||
|
||||
const char* texfmt[] = {
|
||||
// pixel
|
||||
"I4", "I8", "IA4", "IA8",
|
||||
"RGB565", "RGB5A3", "RGBA8", "0x07",
|
||||
"C4", "C8", "C14X2", "0x0B",
|
||||
"0x0C", "0x0D", "CMPR", "0x0F",
|
||||
"I4", "I8", "IA4", "IA8",
|
||||
"RGB565", "RGB5A3", "RGBA8", "0x07",
|
||||
"C4", "C8", "C14X2", "0x0B",
|
||||
"0x0C", "0x0D", "CMPR", "0x0F",
|
||||
// Z-buffer
|
||||
"0x10", "Z8", "0x12", "Z16",
|
||||
"0x14", "0x15", "Z24X8", "0x17",
|
||||
"0x18", "0x19", "0x1A", "0x1B",
|
||||
"0x1C", "0x1D", "0x1E", "0x1F",
|
||||
"0x10", "Z8", "0x12", "Z16",
|
||||
"0x14", "0x15", "Z24X8", "0x17",
|
||||
"0x18", "0x19", "0x1A", "0x1B",
|
||||
"0x1C", "0x1D", "0x1E", "0x1F",
|
||||
// pixel + copy
|
||||
"CR4", "0x21", "CRA4", "CRA8",
|
||||
"0x24", "0x25", "CYUVA8", "CA8",
|
||||
"CR8", "CG8", "CB8", "CRG8",
|
||||
"CGB8", "0x2D", "0x2E", "0x2F",
|
||||
"CR4", "0x21", "CRA4", "CRA8",
|
||||
"0x24", "0x25", "CYUVA8", "CA8",
|
||||
"CR8", "CG8", "CB8", "CRG8",
|
||||
"CGB8", "0x2D", "0x2E", "0x2F",
|
||||
// Z + copy
|
||||
"CZ4", "0x31", "0x32", "0x33",
|
||||
"0x34", "0x35", "0x36", "0x37",
|
||||
"0x38", "CZ8M", "CZ8L", "0x3B",
|
||||
"CZ16L", "0x3D", "0x3E", "0x3F",
|
||||
"CZ4", "0x31", "0x32", "0x33",
|
||||
"0x34", "0x35", "0x36", "0x37",
|
||||
"0x38", "CZ8M", "CZ8L", "0x3B",
|
||||
"CZ16L", "0x3D", "0x3E", "0x3F",
|
||||
};
|
||||
|
||||
const unsigned char sfont_map[] = {
|
||||
|
@ -1478,7 +1478,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
|
||||
const __m128i bV = _mm_or_si128( _mm_slli_epi16(tmpbV, 3), _mm_srli_epi16(tmpbV, 2) );
|
||||
|
||||
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
|
||||
const __m128i final = _mm_or_si128( _mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
|
||||
const __m128i final = _mm_or_si128(_mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
|
||||
_mm_or_si128(_mm_slli_epi32(bV, 16), aVxff00));
|
||||
_mm_storeu_si128( (__m128i*)newdst, final );
|
||||
}
|
||||
@ -1508,7 +1508,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
|
||||
);
|
||||
|
||||
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
|
||||
const __m128i final = _mm_or_si128( _mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
|
||||
const __m128i final = _mm_or_si128(_mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
|
||||
_mm_or_si128(_mm_slli_epi32(bV, 16), _mm_slli_epi32(aV, 24)));
|
||||
_mm_storeu_si128( (__m128i*)newdst, final );
|
||||
}
|
||||
@ -1580,7 +1580,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
|
||||
const __m128i bV = _mm_or_si128( _mm_slli_epi16(tmpbV, 3), _mm_srli_epi16(tmpbV, 2) );
|
||||
|
||||
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
|
||||
const __m128i final = _mm_or_si128( _mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
|
||||
const __m128i final = _mm_or_si128(_mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
|
||||
_mm_or_si128(_mm_slli_epi32(bV, 16), aVxff00));
|
||||
|
||||
// write the final result:
|
||||
@ -1615,7 +1615,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
|
||||
);
|
||||
|
||||
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
|
||||
const __m128i final = _mm_or_si128( _mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
|
||||
const __m128i final = _mm_or_si128(_mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
|
||||
_mm_or_si128(_mm_slli_epi32(bV, 16), _mm_slli_epi32(aV, 24)));
|
||||
|
||||
// write the final result:
|
||||
@ -1675,7 +1675,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
|
||||
const __m128i rgba10 = _mm_shuffle_epi8(_mm_unpacklo_epi8(ar1,gb1),mask0312);
|
||||
const __m128i rgba11 = _mm_shuffle_epi8(_mm_unpackhi_epi8(ar1,gb1),mask0312);
|
||||
|
||||
__m128i *dst128 = (__m128i*)( dst + (y + 0) * width + x );
|
||||
__m128i *dst128 = (__m128i*)( dst + (y + 0) * width + x );
|
||||
_mm_storeu_si128(dst128, rgba00);
|
||||
dst128 = (__m128i*)( dst + (y + 1) * width + x );
|
||||
_mm_storeu_si128(dst128, rgba01);
|
||||
@ -1774,7 +1774,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
|
||||
rgba10 = _mm_or_si128(r__a10, _gb_10);
|
||||
rgba11 = _mm_or_si128(r__a11, _gb_11);
|
||||
// Write em out!
|
||||
__m128i *dst128 = (__m128i*)( dst + (y + 0) * width + x );
|
||||
__m128i *dst128 = (__m128i*)( dst + (y + 0) * width + x );
|
||||
_mm_storeu_si128(dst128, rgba00);
|
||||
dst128 = (__m128i*)( dst + (y + 1) * width + x );
|
||||
_mm_storeu_si128(dst128, rgba01);
|
||||
|
@ -391,7 +391,7 @@ void LOADERDECL UpdateBoundingBox()
|
||||
{
|
||||
m = (p1.x - p0.x) ? ((p1.y - p0.y) / (p1.x - p0.x)) : highNum;
|
||||
c = p0.y - (m * p0.x);
|
||||
if (i0 & 1) { s = (s32)(c + roundUp); if (s >= 0 && s <= 479) left = 0; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i0 & 1) { s = (s32)(c + roundUp); if (s >= 0 && s <= 479) left = 0; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i0 & 2) { s = (s32)((-c / m) + roundUp); if (s >= 0 && s <= 607) top = 0; left = (s < left) ? s : left; right = (s > right) ? s : right; }
|
||||
if (i0 & 4) { s = (s32)((m * 607) + c + roundUp); if (s >= 0 && s <= 479) right = 607; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i0 & 8) { s = (s32)(((479 - c) / m) + roundUp); if (s >= 0 && s <= 607) bottom = 479; left = (s < left) ? s : left; right = (s > right) ? s : right; }
|
||||
@ -405,7 +405,7 @@ void LOADERDECL UpdateBoundingBox()
|
||||
{
|
||||
m = (p2.x - p1.x) ? ((p2.y - p1.y) / (p2.x - p1.x)) : highNum;
|
||||
c = p1.y - (m * p1.x);
|
||||
if (i1 & 1) { s = (s32)(c + roundUp); if (s >= 0 && s <= 479) left = 0; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i1 & 1) { s = (s32)(c + roundUp); if (s >= 0 && s <= 479) left = 0; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i1 & 2) { s = (s32)((-c / m) + roundUp); if (s >= 0 && s <= 607) top = 0; left = (s < left) ? s : left; right = (s > right) ? s : right; }
|
||||
if (i1 & 4) { s = (s32)((m * 607) + c + roundUp); if (s >= 0 && s <= 479) right = 607; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i1 & 8) { s = (s32)(((479 - c) / m) + roundUp); if (s >= 0 && s <= 607) bottom = 479; left = (s < left) ? s : left; right = (s > right) ? s : right; }
|
||||
@ -416,7 +416,7 @@ void LOADERDECL UpdateBoundingBox()
|
||||
{
|
||||
m = (p2.x - p0.x) ? ((p2.y - p0.y) / (p2.x - p0.x)) : highNum;
|
||||
c = p0.y - (m * p0.x);
|
||||
if (i2 & 1) { s = (s32)(c + roundUp); if (s >= 0 && s <= 479) left = 0; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i2 & 1) { s = (s32)(c + roundUp); if (s >= 0 && s <= 479) left = 0; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i2 & 2) { s = (s32)((-c / m) + roundUp); if (s >= 0 && s <= 607) top = 0; left = (s < left) ? s : left; right = (s > right) ? s : right; }
|
||||
if (i2 & 4) { s = (s32)((m * 607) + c + roundUp); if (s >= 0 && s <= 479) right = 607; top = (s < top) ? s : top; bottom = (s > bottom) ? s : bottom; }
|
||||
if (i2 & 8) { s = (s32)(((479 - c) / m) + roundUp); if (s >= 0 && s <= 607) bottom = 479; left = (s < left) ? s : left; right = (s > right) ? s : right; }
|
||||
@ -636,12 +636,12 @@ void VertexLoader::CompileVertexTranslator()
|
||||
case DIRECT:
|
||||
switch (m_VtxAttr.color[i].Comp)
|
||||
{
|
||||
case FORMAT_16B_565: m_VertexSize += 2; WriteCall(Color_ReadDirect_16b_565); break;
|
||||
case FORMAT_24B_888: m_VertexSize += 3; WriteCall(Color_ReadDirect_24b_888); break;
|
||||
case FORMAT_32B_888x: m_VertexSize += 4; WriteCall(Color_ReadDirect_32b_888x); break;
|
||||
case FORMAT_16B_4444: m_VertexSize += 2; WriteCall(Color_ReadDirect_16b_4444); break;
|
||||
case FORMAT_24B_6666: m_VertexSize += 3; WriteCall(Color_ReadDirect_24b_6666); break;
|
||||
case FORMAT_32B_8888: m_VertexSize += 4; WriteCall(Color_ReadDirect_32b_8888); break;
|
||||
case FORMAT_16B_565: m_VertexSize += 2; WriteCall(Color_ReadDirect_16b_565); break;
|
||||
case FORMAT_24B_888: m_VertexSize += 3; WriteCall(Color_ReadDirect_24b_888); break;
|
||||
case FORMAT_32B_888x: m_VertexSize += 4; WriteCall(Color_ReadDirect_32b_888x); break;
|
||||
case FORMAT_16B_4444: m_VertexSize += 2; WriteCall(Color_ReadDirect_16b_4444); break;
|
||||
case FORMAT_24B_6666: m_VertexSize += 3; WriteCall(Color_ReadDirect_24b_6666); break;
|
||||
case FORMAT_32B_8888: m_VertexSize += 4; WriteCall(Color_ReadDirect_32b_8888); break;
|
||||
default: _assert_(0); break;
|
||||
}
|
||||
break;
|
||||
@ -649,12 +649,12 @@ void VertexLoader::CompileVertexTranslator()
|
||||
m_VertexSize += 1;
|
||||
switch (m_VtxAttr.color[i].Comp)
|
||||
{
|
||||
case FORMAT_16B_565: WriteCall(Color_ReadIndex8_16b_565); break;
|
||||
case FORMAT_24B_888: WriteCall(Color_ReadIndex8_24b_888); break;
|
||||
case FORMAT_32B_888x: WriteCall(Color_ReadIndex8_32b_888x); break;
|
||||
case FORMAT_16B_4444: WriteCall(Color_ReadIndex8_16b_4444); break;
|
||||
case FORMAT_24B_6666: WriteCall(Color_ReadIndex8_24b_6666); break;
|
||||
case FORMAT_32B_8888: WriteCall(Color_ReadIndex8_32b_8888); break;
|
||||
case FORMAT_16B_565: WriteCall(Color_ReadIndex8_16b_565); break;
|
||||
case FORMAT_24B_888: WriteCall(Color_ReadIndex8_24b_888); break;
|
||||
case FORMAT_32B_888x: WriteCall(Color_ReadIndex8_32b_888x); break;
|
||||
case FORMAT_16B_4444: WriteCall(Color_ReadIndex8_16b_4444); break;
|
||||
case FORMAT_24B_6666: WriteCall(Color_ReadIndex8_24b_6666); break;
|
||||
case FORMAT_32B_8888: WriteCall(Color_ReadIndex8_32b_8888); break;
|
||||
default: _assert_(0); break;
|
||||
}
|
||||
break;
|
||||
@ -662,12 +662,12 @@ void VertexLoader::CompileVertexTranslator()
|
||||
m_VertexSize += 2;
|
||||
switch (m_VtxAttr.color[i].Comp)
|
||||
{
|
||||
case FORMAT_16B_565: WriteCall(Color_ReadIndex16_16b_565); break;
|
||||
case FORMAT_24B_888: WriteCall(Color_ReadIndex16_24b_888); break;
|
||||
case FORMAT_32B_888x: WriteCall(Color_ReadIndex16_32b_888x); break;
|
||||
case FORMAT_16B_4444: WriteCall(Color_ReadIndex16_16b_4444); break;
|
||||
case FORMAT_24B_6666: WriteCall(Color_ReadIndex16_24b_6666); break;
|
||||
case FORMAT_32B_8888: WriteCall(Color_ReadIndex16_32b_8888); break;
|
||||
case FORMAT_16B_565: WriteCall(Color_ReadIndex16_16b_565); break;
|
||||
case FORMAT_24B_888: WriteCall(Color_ReadIndex16_24b_888); break;
|
||||
case FORMAT_32B_888x: WriteCall(Color_ReadIndex16_32b_888x); break;
|
||||
case FORMAT_16B_4444: WriteCall(Color_ReadIndex16_16b_4444); break;
|
||||
case FORMAT_24B_6666: WriteCall(Color_ReadIndex16_24b_6666); break;
|
||||
case FORMAT_32B_8888: WriteCall(Color_ReadIndex16_32b_8888); break;
|
||||
default: _assert_(0); break;
|
||||
}
|
||||
break;
|
||||
|
@ -100,9 +100,9 @@ void LOADERDECL Color_ReadDirect_24b_6666()
|
||||
// F|RES: i am not 100 percent sure, but the colElements seems to be important for rendering only
|
||||
// at least it fixes mario party 4
|
||||
//
|
||||
// if (colElements[colIndex])
|
||||
// else
|
||||
// col |= 0xFF<<ASHIFT;
|
||||
// if (colElements[colIndex])
|
||||
// else
|
||||
// col |= 0xFF<<ASHIFT;
|
||||
//
|
||||
void LOADERDECL Color_ReadDirect_32b_8888()
|
||||
{
|
||||
|
@ -110,74 +110,74 @@ struct Normal_Index_Indices3
|
||||
|
||||
void VertexLoader_Normal::Init(void)
|
||||
{
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_UBYTE] = Normal_Direct<u8, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_UBYTE] = Normal_Direct<u8, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_BYTE] = Normal_Direct<s8, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_USHORT] = Normal_Direct<u16, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_SHORT] = Normal_Direct<s16, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_FLOAT] = Normal_Direct<float, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_UBYTE] = Normal_Direct<u8, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_BYTE] = Normal_Direct<s8, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_USHORT] = Normal_Direct<u16, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_SHORT] = Normal_Direct<s16, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_FLOAT] = Normal_Direct<float, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_USHORT] = Normal_Direct<u16, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_SHORT] = Normal_Direct<s16, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT] [FORMAT_FLOAT] = Normal_Direct<float, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_UBYTE] = Normal_Direct<u8, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_BYTE] = Normal_Direct<s8, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_USHORT] = Normal_Direct<u16, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_SHORT] = Normal_Direct<s16, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES1][NRM_NBT3][FORMAT_FLOAT] = Normal_Direct<float, 3>();
|
||||
|
||||
// Same as above
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_UBYTE] = Normal_Direct<u8, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_BYTE] = Normal_Direct<s8, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_USHORT] = Normal_Direct<u16, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_SHORT] = Normal_Direct<s16, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_FLOAT] = Normal_Direct<float, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_UBYTE] = Normal_Direct<u8, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_BYTE] = Normal_Direct<s8, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_USHORT] = Normal_Direct<u16, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_SHORT] = Normal_Direct<s16, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_FLOAT] = Normal_Direct<float, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_UBYTE] = Normal_Direct<u8, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_BYTE] = Normal_Direct<s8, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_USHORT] = Normal_Direct<u16, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_SHORT] = Normal_Direct<s16, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT] [FORMAT_FLOAT] = Normal_Direct<float, 1>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_UBYTE] = Normal_Direct<u8, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_BYTE] = Normal_Direct<s8, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_USHORT] = Normal_Direct<u16, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_SHORT] = Normal_Direct<s16, 3>();
|
||||
m_Table[NRM_DIRECT] [NRM_INDICES3][NRM_NBT3][FORMAT_FLOAT] = Normal_Direct<float, 3>();
|
||||
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_UBYTE] = Normal_Index<u8, u8, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_BYTE] = Normal_Index<u8, s8, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_USHORT] = Normal_Index<u8, u16, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_SHORT] = Normal_Index<u8, s16, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_FLOAT] = Normal_Index<u8, float, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_UBYTE] = Normal_Index<u8, u8, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_BYTE] = Normal_Index<u8, s8, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_USHORT] = Normal_Index<u8, u16, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_SHORT] = Normal_Index<u8, s16, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_FLOAT] = Normal_Index<u8, float, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_UBYTE] = Normal_Index<u8, u8, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_BYTE] = Normal_Index<u8, s8, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_USHORT] = Normal_Index<u8, u16, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_SHORT] = Normal_Index<u8, s16, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT] [FORMAT_FLOAT] = Normal_Index<u8, float, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_UBYTE] = Normal_Index<u8, u8, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_BYTE] = Normal_Index<u8, s8, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_USHORT] = Normal_Index<u8, u16, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_SHORT] = Normal_Index<u8, s16, 3>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES1][NRM_NBT3][FORMAT_FLOAT] = Normal_Index<u8, float, 3>();
|
||||
|
||||
// Same as above for NRM_NBT
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_UBYTE] = Normal_Index<u8, u8, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_BYTE] = Normal_Index<u8, s8, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_USHORT] = Normal_Index<u8, u16, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_SHORT] = Normal_Index<u8, s16, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_FLOAT] = Normal_Index<u8, float, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_UBYTE] = Normal_Index_Indices3<u8, u8>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_BYTE] = Normal_Index_Indices3<u8, s8>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_USHORT] = Normal_Index_Indices3<u8, u16>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_SHORT] = Normal_Index_Indices3<u8, s16>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_FLOAT] = Normal_Index_Indices3<u8, float>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_UBYTE] = Normal_Index<u8, u8, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_BYTE] = Normal_Index<u8, s8, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_USHORT] = Normal_Index<u8, u16, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_SHORT] = Normal_Index<u8, s16, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT] [FORMAT_FLOAT] = Normal_Index<u8, float, 1>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_UBYTE] = Normal_Index_Indices3<u8, u8>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_BYTE] = Normal_Index_Indices3<u8, s8>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_USHORT] = Normal_Index_Indices3<u8, u16>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_SHORT] = Normal_Index_Indices3<u8, s16>();
|
||||
m_Table[NRM_INDEX8] [NRM_INDICES3][NRM_NBT3][FORMAT_FLOAT] = Normal_Index_Indices3<u8, float>();
|
||||
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_UBYTE] = Normal_Index<u16, u8, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_BYTE] = Normal_Index<u16, s8, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_USHORT] = Normal_Index<u16, u16, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_SHORT] = Normal_Index<u16, s16, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_FLOAT] = Normal_Index<u16, float, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_UBYTE] = Normal_Index<u16, u8, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_BYTE] = Normal_Index<u16, s8, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_USHORT] = Normal_Index<u16, u16, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_SHORT] = Normal_Index<u16, s16, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_FLOAT] = Normal_Index<u16, float, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_UBYTE] = Normal_Index<u16, u8, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_BYTE] = Normal_Index<u16, s8, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_USHORT] = Normal_Index<u16, u16, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_SHORT] = Normal_Index<u16, s16, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT] [FORMAT_FLOAT] = Normal_Index<u16, float, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_UBYTE] = Normal_Index<u16, u8, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_BYTE] = Normal_Index<u16, s8, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_USHORT] = Normal_Index<u16, u16, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_SHORT] = Normal_Index<u16, s16, 3>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES1][NRM_NBT3][FORMAT_FLOAT] = Normal_Index<u16, float, 3>();
|
||||
|
||||
// Same as above for NRM_NBT
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_UBYTE] = Normal_Index<u16, u8, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_BYTE] = Normal_Index<u16, s8, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_USHORT] = Normal_Index<u16, u16, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_SHORT] = Normal_Index<u16, s16, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_FLOAT] = Normal_Index<u16, float, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_UBYTE] = Normal_Index_Indices3<u16, u8>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_BYTE] = Normal_Index_Indices3<u16, s8>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_USHORT] = Normal_Index_Indices3<u16, u16>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_SHORT] = Normal_Index_Indices3<u16, s16>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_FLOAT] = Normal_Index_Indices3<u16, float>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_UBYTE] = Normal_Index<u16, u8, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_BYTE] = Normal_Index<u16, s8, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_USHORT] = Normal_Index<u16, u16, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_SHORT] = Normal_Index<u16, s16, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT] [FORMAT_FLOAT] = Normal_Index<u16, float, 1>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_UBYTE] = Normal_Index_Indices3<u16, u8>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_BYTE] = Normal_Index_Indices3<u16, s8>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_USHORT] = Normal_Index_Indices3<u16, u16>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_SHORT] = Normal_Index_Indices3<u16, s16>();
|
||||
m_Table[NRM_INDEX16][NRM_INDICES3][NRM_NBT3][FORMAT_FLOAT] = Normal_Index_Indices3<u16, float>();
|
||||
}
|
||||
|
||||
unsigned int VertexLoader_Normal::GetSize(unsigned int _type,
|
||||
|
@ -50,7 +50,7 @@
|
||||
#define C_NORMALMATRICES (C_TRANSFORMMATRICES + 64)
|
||||
#define C_POSTTRANSFORMMATRICES (C_NORMALMATRICES + 32)
|
||||
#define C_DEPTHPARAMS (C_POSTTRANSFORMMATRICES + 64)
|
||||
#define C_VENVCONST_END (C_DEPTHPARAMS + 1)
|
||||
#define C_VENVCONST_END (C_DEPTHPARAMS + 1)
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
|
@ -378,7 +378,7 @@ void VertexShaderManager::SetConstants()
|
||||
if(!g_ActiveConfig.backend_info.bSupportsOversizedViewports)
|
||||
{
|
||||
ViewportCorrectionMatrix(s_viewportCorrection);
|
||||
bProjectionChanged = true;
|
||||
bProjectionChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,6 @@
|
||||
#define _WIN32_IE 0x0500 // Default value is 0x0400
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <algorithm>
|
||||
|
Reference in New Issue
Block a user