Merge pull request #2355 from RadWolfie/fix-gui-purge-regress
Fix pull request 2348 regression
This commit is contained in:
commit
1077115038
|
@ -5956,7 +5956,7 @@ void CreateHostResource(xbox::X_D3DResource *pResource, DWORD D3DUsage, int iTex
|
||||||
pSrc, pxMipWidth, pxMipHeight, dwMipRowPitch, mip2dSize,
|
pSrc, pxMipWidth, pxMipHeight, dwMipRowPitch, mip2dSize,
|
||||||
pDst, dwDstRowPitch, dwDstSlicePitch,
|
pDst, dwDstRowPitch, dwDstSlicePitch,
|
||||||
pxMipDepth,//used pxMipDepth here because in 3D mip map the 3rd dimension also shrinked to 1/2 at each mip level.
|
pxMipDepth,//used pxMipDepth here because in 3D mip map the 3rd dimension also shrinked to 1/2 at each mip level.
|
||||||
iTextureStage)) {
|
g_pXbox_Palette_Data[iTextureStage])) {
|
||||||
CxbxrAbort("Unhandled conversion!");
|
CxbxrAbort("Unhandled conversion!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1591,8 +1591,6 @@ Direct3D9 states unused :
|
||||||
D3DRS_BLENDOPALPHA = 209 // Blending operation for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE
|
D3DRS_BLENDOPALPHA = 209 // Blending operation for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static xbox::PVOID g_pXbox_Palette_Data[xbox::X_D3DTS_STAGECOUNT] = { xbox::zeroptr, xbox::zeroptr, xbox::zeroptr, xbox::zeroptr }; // cached palette pointer
|
|
||||||
|
|
||||||
xbox::X_D3DFORMAT GetXboxPixelContainerFormat(const xbox::dword_xt XboxPixelContainer_Format)
|
xbox::X_D3DFORMAT GetXboxPixelContainerFormat(const xbox::dword_xt XboxPixelContainer_Format)
|
||||||
{
|
{
|
||||||
xbox::X_D3DFORMAT d3d_format = (xbox::X_D3DFORMAT)((XboxPixelContainer_Format & X_D3DFORMAT_FORMAT_MASK) >> X_D3DFORMAT_FORMAT_SHIFT);
|
xbox::X_D3DFORMAT d3d_format = (xbox::X_D3DFORMAT)((XboxPixelContainer_Format & X_D3DFORMAT_FORMAT_MASK) >> X_D3DFORMAT_FORMAT_SHIFT);
|
||||||
|
@ -1655,7 +1653,7 @@ bool ConvertD3DTextureToARGBBuffer(
|
||||||
int SrcWidth, int SrcHeight, int SrcRowPitch, int SrcSlicePitch,
|
int SrcWidth, int SrcHeight, int SrcRowPitch, int SrcSlicePitch,
|
||||||
uint8_t* pDst, int DstRowPitch, int DstSlicePitch,
|
uint8_t* pDst, int DstRowPitch, int DstSlicePitch,
|
||||||
unsigned int uiDepth ,
|
unsigned int uiDepth ,
|
||||||
int iTextureStage
|
xbox::PVOID pPalleteData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const FormatToARGBRow ConvertRowToARGB = EmuXBFormatComponentConverter(X_Format);
|
const FormatToARGBRow ConvertRowToARGB = EmuXBFormatComponentConverter(X_Format);
|
||||||
|
@ -1678,7 +1676,7 @@ bool ConvertD3DTextureToARGBBuffer(
|
||||||
|
|
||||||
int AdditionalArgument;
|
int AdditionalArgument;
|
||||||
if (X_Format == xbox::X_D3DFMT_P8)
|
if (X_Format == xbox::X_D3DFMT_P8)
|
||||||
AdditionalArgument = (int)g_pXbox_Palette_Data[iTextureStage];
|
AdditionalArgument = (int)pPalleteData;
|
||||||
else
|
else
|
||||||
AdditionalArgument = DstRowPitch;
|
AdditionalArgument = DstRowPitch;
|
||||||
|
|
||||||
|
@ -1723,7 +1721,7 @@ uint8_t* ConvertD3DTextureToARGB(
|
||||||
xbox::X_D3DPixelContainer* pXboxPixelContainer,
|
xbox::X_D3DPixelContainer* pXboxPixelContainer,
|
||||||
uint8_t* pSrc,
|
uint8_t* pSrc,
|
||||||
int* pWidth, int* pHeight,
|
int* pWidth, int* pHeight,
|
||||||
int TextureStage // default = 0
|
xbox::PVOID pPalleteData // default = zeroptr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Avoid allocating pDest when ConvertD3DTextureToARGBBuffer will fail anyway
|
// Avoid allocating pDest when ConvertD3DTextureToARGBBuffer will fail anyway
|
||||||
|
@ -1756,7 +1754,7 @@ uint8_t* ConvertD3DTextureToARGB(
|
||||||
pSrc, *pWidth, *pHeight, SrcRowPitch, SrcSlicePitch,
|
pSrc, *pWidth, *pHeight, SrcRowPitch, SrcSlicePitch,
|
||||||
pDst, DstRowPitch, DstSlicePitch,
|
pDst, DstRowPitch, DstSlicePitch,
|
||||||
DstDepth,
|
DstDepth,
|
||||||
TextureStage);
|
pPalleteData);
|
||||||
|
|
||||||
// NOTE : Caller must take ownership!
|
// NOTE : Caller must take ownership!
|
||||||
return pDst;
|
return pDst;
|
||||||
|
|
|
@ -1830,7 +1830,7 @@ extern bool ConvertD3DTextureToARGBBuffer(
|
||||||
int SrcWidth, int SrcHeight, int SrcRowPitch, int SrcSlicePitch,
|
int SrcWidth, int SrcHeight, int SrcRowPitch, int SrcSlicePitch,
|
||||||
uint8_t* pDst, int DstRowPitch, int DstSlicePitch,
|
uint8_t* pDst, int DstRowPitch, int DstSlicePitch,
|
||||||
unsigned int uiDepth = 1,
|
unsigned int uiDepth = 1,
|
||||||
int iTextureStage = 0
|
xbox::PVOID pPalleteData = xbox::zeroptr
|
||||||
);
|
);
|
||||||
|
|
||||||
extern void CxbxSetPixelContainerHeader
|
extern void CxbxSetPixelContainerHeader
|
||||||
|
@ -1849,7 +1849,7 @@ extern uint8_t* ConvertD3DTextureToARGB(
|
||||||
xbox::X_D3DPixelContainer* pXboxPixelContainer,
|
xbox::X_D3DPixelContainer* pXboxPixelContainer,
|
||||||
uint8_t* pSrc,
|
uint8_t* pSrc,
|
||||||
int* pWidth, int* pHeight,
|
int* pWidth, int* pHeight,
|
||||||
int TextureStage = 0
|
xbox::PVOID pPalleteData = xbox::zeroptr
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue