diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-06-07 23:25:16 -0400 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-06-07 23:25:16 -0400 |
| commit | 499478bcadfd34f986d2e7d4e2a1594d6cdd40a4 (patch) | |
| tree | 6a9196e201086889d489e915244c84cddf82923d /Source/Core/VideoBackends/D3D/D3DUtil.cpp | |
| parent | 9969273994d2a53f3b5032f794ee3d86b923b0c7 (diff) | |
| parent | 75fef8e26f14f4c29a7083f5ebdb9503d397f02d (diff) | |
Merge pull request #2550 from Armada651/d3d-pokes
D3D: Implement Z pokes.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/D3DUtil.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DUtil.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DUtil.cpp b/Source/Core/VideoBackends/D3D/D3DUtil.cpp index 9ddf1f7210..e26f960fa3 100644 --- a/Source/Core/VideoBackends/D3D/D3DUtil.cpp +++ b/Source/Core/VideoBackends/D3D/D3DUtil.cpp @@ -442,7 +442,7 @@ struct struct { - float x1, y1, x2, y2; + float x1, y1, x2, y2, z; u32 col; } draw_quad_data; @@ -572,19 +572,19 @@ void drawShadedTexQuad(ID3D11ShaderResourceView* texture, // 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) +void drawColorQuad(u32 Color, float z, float x1, float y1, float x2, float y2) { ColVertex coords[4] = { - { x1, y2, 0.f, Color }, - { x2, y2, 0.f, Color }, - { x1, y1, 0.f, Color }, - { x2, y1, 0.f, Color }, + { x1, y1, z, Color }, + { x2, y1, z, Color }, + { x1, y2, z, Color }, + { x2, y2, z, Color }, }; if (cq_observer || draw_quad_data.x1 != x1 || draw_quad_data.y1 != y1 || draw_quad_data.x2 != x2 || draw_quad_data.y2 != y2 || - draw_quad_data.col != Color) + draw_quad_data.col != Color || draw_quad_data.z != z) { cq_offset = util_vbuf->AppendData(coords, sizeof(coords), sizeof(ColVertex)); cq_observer = false; @@ -594,10 +594,11 @@ void drawColorQuad(u32 Color, float x1, float y1, float x2, float y2) draw_quad_data.x2 = x2; draw_quad_data.y2 = y2; draw_quad_data.col = Color; + draw_quad_data.z = z; } stateman->SetVertexShader(VertexShaderCache::GetClearVertexShader()); - stateman->SetGeometryShader(g_ActiveConfig.iStereoMode > 0 ? GeometryShaderCache::GetClearGeometryShader() : nullptr); + stateman->SetGeometryShader(GeometryShaderCache::GetClearGeometryShader()); stateman->SetPixelShader(PixelShaderCache::GetClearProgram()); stateman->SetInputLayout(VertexShaderCache::GetClearInputLayout()); |
