summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/D3DUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DUtil.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DUtil.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DUtil.cpp b/Source/Core/VideoBackends/D3D/D3DUtil.cpp
index 020045d687..dd54756be1 100644
--- a/Source/Core/VideoBackends/D3D/D3DUtil.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DUtil.cpp
@@ -570,72 +570,6 @@ void drawShadedTexQuad(ID3D11ShaderResourceView* texture,
D3D::stateman->SetGeometryShader(nullptr);
}
-void drawShadedTexSubQuad(ID3D11ShaderResourceView* texture,
- const MathUtil::Rectangle<int>* rSource,
- int SourceWidth,
- int SourceHeight,
- const MathUtil::Rectangle<float>* rDest,
- ID3D11PixelShader* PShader,
- ID3D11VertexShader* VShader,
- ID3D11InputLayout* layout,
- ID3D11GeometryShader* GShader,
- float Gamma,
- u32 slice)
-{
- float sw = 1.0f /(float) SourceWidth;
- float sh = 1.0f /(float) SourceHeight;
- float u1 = (rSource->left ) * sw;
- float u2 = (rSource->right ) * sw;
- float v1 = (rSource->top ) * sh;
- float v2 = (rSource->bottom) * sh;
- float S = (float)slice;
- float G = 1.0f / Gamma;
-
- STSQVertex coords[4] = {
- { rDest->left , rDest->bottom, 0.0f, u1, v2, S, G},
- { rDest->right, rDest->bottom, 0.0f, u2, v2, S, G},
- { rDest->left , rDest->top , 0.0f, u1, v1, S, G},
- { rDest->right, rDest->top , 0.0f, u2, v1, S, G},
- };
-
- // only upload the data to VRAM if it changed
- if (stsq_observer ||
- memcmp(rDest, &tex_sub_quad_data.rdest, sizeof(*rDest)) != 0 ||
- tex_sub_quad_data.u1 != u1 || tex_sub_quad_data.v1 != v1 ||
- tex_sub_quad_data.u2 != u2 || tex_sub_quad_data.v2 != v2 ||
- tex_sub_quad_data.S != S || tex_sub_quad_data.G != G)
- {
- stsq_offset = util_vbuf->AppendData(coords, sizeof(coords), sizeof(STSQVertex));
- stsq_observer = false;
-
- tex_sub_quad_data.u1 = u1;
- tex_sub_quad_data.v1 = v1;
- tex_sub_quad_data.u2 = u2;
- tex_sub_quad_data.v2 = v2;
- tex_sub_quad_data.S = S;
- tex_sub_quad_data.G = G;
- memcpy(&tex_sub_quad_data.rdest, &rDest, sizeof(rDest));
- }
- UINT stride = sizeof(STSQVertex);
- UINT offset = 0;
-
- stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
- stateman->SetVertexBuffer(util_vbuf->GetBuffer(), stride, offset);
- stateman->SetInputLayout(layout);
- stateman->SetTexture(0, texture);
- stateman->SetPixelShader(PShader);
- stateman->SetVertexShader(VShader);
- stateman->SetGeometryShader(GShader);
-
- stateman->Apply();
- context->Draw(4, stsq_offset);
-
- stateman->SetTexture(0, nullptr); // immediately unbind the texture
- stateman->Apply();
-
- stateman->SetGeometryShader(nullptr);
-}
-
// Fills a certain area of the current render target with the specified color
// destination coordinates normalized to (-1;1)
void drawColorQuad(u32 Color, float x1, float y1, float x2, float y2)