mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Video backends: mass-replace "xfregs" with "xfmem".
This commit is contained in:
@ -176,10 +176,10 @@ bool LineGeometryShader::SetShader(u32 components, float lineWidth,
|
||||
code.Write("\n%s", LINE_GS_COMMON);
|
||||
|
||||
std::stringstream numTexCoordsStream;
|
||||
numTexCoordsStream << xfregs.numTexGen.numTexGens;
|
||||
numTexCoordsStream << xfmem.numTexGen.numTexGens;
|
||||
|
||||
INFO_LOG(VIDEO, "Compiling line geometry shader for components 0x%.08X (num texcoords %d)",
|
||||
components, xfregs.numTexGen.numTexGens);
|
||||
components, xfmem.numTexGen.numTexGens);
|
||||
|
||||
const std::string& numTexCoordsStr = numTexCoordsStream.str();
|
||||
D3D_SHADER_MACRO macros[] = {
|
||||
|
@ -170,10 +170,10 @@ bool PointGeometryShader::SetShader(u32 components, float pointSize,
|
||||
code.Write("\n%s", POINT_GS_COMMON);
|
||||
|
||||
std::stringstream numTexCoordsStream;
|
||||
numTexCoordsStream << xfregs.numTexGen.numTexGens;
|
||||
numTexCoordsStream << xfmem.numTexGen.numTexGens;
|
||||
|
||||
INFO_LOG(VIDEO, "Compiling point geometry shader for components 0x%.08X (num texcoords %d)",
|
||||
components, xfregs.numTexGen.numTexGens);
|
||||
components, xfmem.numTexGen.numTexGens);
|
||||
|
||||
const std::string& numTexCoordsStr = numTexCoordsStream.str();
|
||||
D3D_SHADER_MACRO macros[] = {
|
||||
|
@ -487,16 +487,16 @@ void Renderer::SetViewport()
|
||||
// [5] = 16777215 * farz
|
||||
|
||||
// D3D crashes for zero viewports
|
||||
if (xfregs.viewport.wd == 0 || xfregs.viewport.ht == 0)
|
||||
if (xfmem.viewport.wd == 0 || xfmem.viewport.ht == 0)
|
||||
return;
|
||||
|
||||
int scissorXOff = bpmem.scissorOffset.x * 2;
|
||||
int scissorYOff = bpmem.scissorOffset.y * 2;
|
||||
|
||||
float X = Renderer::EFBToScaledXf(xfregs.viewport.xOrig - xfregs.viewport.wd - scissorXOff);
|
||||
float Y = Renderer::EFBToScaledYf(xfregs.viewport.yOrig + xfregs.viewport.ht - scissorYOff);
|
||||
float Wd = Renderer::EFBToScaledXf(2.0f * xfregs.viewport.wd);
|
||||
float Ht = Renderer::EFBToScaledYf(-2.0f * xfregs.viewport.ht);
|
||||
float X = Renderer::EFBToScaledXf(xfmem.viewport.xOrig - xfmem.viewport.wd - scissorXOff);
|
||||
float Y = Renderer::EFBToScaledYf(xfmem.viewport.yOrig + xfmem.viewport.ht - scissorYOff);
|
||||
float Wd = Renderer::EFBToScaledXf(2.0f * xfmem.viewport.wd);
|
||||
float Ht = Renderer::EFBToScaledYf(-2.0f * xfmem.viewport.ht);
|
||||
if (Wd < 0.0f)
|
||||
{
|
||||
X += Wd;
|
||||
@ -516,8 +516,8 @@ void Renderer::SetViewport()
|
||||
|
||||
// Some games set invalid values for z-min and z-max so fix them to the max and min allowed and let the shaders do this work
|
||||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht,
|
||||
0.f, // (xfregs.viewport.farZ - xfregs.viewport.zRange) / 16777216.0f;
|
||||
1.f); // xfregs.viewport.farZ / 16777216.0f;
|
||||
0.f, // (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f;
|
||||
1.f); // xfmem.viewport.farZ / 16777216.0f;
|
||||
D3D::context->RSSetViewports(1, &vp);
|
||||
}
|
||||
|
||||
|
@ -151,8 +151,8 @@ void VertexManager::Draw(UINT stride)
|
||||
{
|
||||
float lineWidth = float(bpmem.lineptwidth.linesize) / 6.f;
|
||||
float texOffset = LINE_PT_TEX_OFFSETS[bpmem.lineptwidth.lineoff];
|
||||
float vpWidth = 2.0f * xfregs.viewport.wd;
|
||||
float vpHeight = -2.0f * xfregs.viewport.ht;
|
||||
float vpWidth = 2.0f * xfmem.viewport.wd;
|
||||
float vpHeight = -2.0f * xfmem.viewport.ht;
|
||||
|
||||
bool texOffsetEnable[8];
|
||||
|
||||
@ -175,8 +175,8 @@ void VertexManager::Draw(UINT stride)
|
||||
{
|
||||
float pointSize = float(bpmem.lineptwidth.pointsize) / 6.f;
|
||||
float texOffset = LINE_PT_TEX_OFFSETS[bpmem.lineptwidth.pointoff];
|
||||
float vpWidth = 2.0f * xfregs.viewport.wd;
|
||||
float vpHeight = -2.0f * xfregs.viewport.ht;
|
||||
float vpWidth = 2.0f * xfmem.viewport.wd;
|
||||
float vpHeight = -2.0f * xfmem.viewport.ht;
|
||||
|
||||
bool texOffsetEnable[8];
|
||||
|
||||
|
Reference in New Issue
Block a user