From 055f236aa560d69cb45f93558d82fe3ffb7def39 Mon Sep 17 00:00:00 2001 From: Akash Date: Thu, 13 Oct 2016 14:55:48 +0530 Subject: [PATCH] GSVector: Add constructor to dispatch same values --- plugins/GSdx/GSDeviceOGL.h | 4 ++-- plugins/GSdx/GSRenderer.cpp | 2 +- plugins/GSdx/GSRendererDX.h | 2 +- plugins/GSdx/GSRendererDX11.cpp | 2 +- plugins/GSdx/GSRendererDX9.cpp | 8 ++++---- plugins/GSdx/GSVector.h | 6 ++++++ 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/plugins/GSdx/GSDeviceOGL.h b/plugins/GSdx/GSDeviceOGL.h index 196553aaf6..04d07a5cd3 100644 --- a/plugins/GSdx/GSDeviceOGL.h +++ b/plugins/GSdx/GSDeviceOGL.h @@ -126,8 +126,8 @@ public: VSConstantBuffer() { Vertex_Scale_Offset = GSVector4::zero(); - DepthMask = GSVector2i(0, 0); - PointSize = GSVector2(0, 0); + DepthMask = GSVector2i(0); + PointSize = GSVector2(0); } __forceinline bool Update(const VSConstantBuffer* cb) diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index 8a4f3dec4e..f452751aff 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -231,7 +231,7 @@ bool GSRenderer::Merge(int field) src[i] = GSVector4(r) * scale / GSVector4(tex[i]->GetSize()).xyxy(); src_hw[i] = (GSVector4(r) + GSVector4 (0, y_offset[i], 0, y_offset[i])) * scale / GSVector4(tex[i]->GetSize()).xyxy(); - GSVector2 off(0, 0); + GSVector2 off(0); GSVector2i display_diff(dr[i].left - display_baseline.x, dr[i].top - display_baseline.y); GSVector2i frame_diff(fr[i].left - frame_baseline.x, fr[i].top - frame_baseline.y); diff --git a/plugins/GSdx/GSRendererDX.h b/plugins/GSdx/GSRendererDX.h index 71ed8fecd7..da5cd821f2 100644 --- a/plugins/GSdx/GSRendererDX.h +++ b/plugins/GSdx/GSRendererDX.h @@ -58,7 +58,7 @@ protected: GSDeviceDX::PSConstantBuffer ps_cb; public: - GSRendererDX(GSTextureCache* tc, const GSVector2& pixelcenter = GSVector2(0, 0)); + GSRendererDX(GSTextureCache* tc, const GSVector2& pixelcenter = GSVector2(0)); virtual ~GSRendererDX(); }; diff --git a/plugins/GSdx/GSRendererDX11.cpp b/plugins/GSdx/GSRendererDX11.cpp index 4eeb93734b..34172b2b89 100644 --- a/plugins/GSdx/GSRendererDX11.cpp +++ b/plugins/GSdx/GSRendererDX11.cpp @@ -25,7 +25,7 @@ #include "resource.h" GSRendererDX11::GSRendererDX11() - : GSRendererDX(new GSTextureCache11(this), GSVector2(-0.5f, -0.5f)) + : GSRendererDX(new GSTextureCache11(this), GSVector2(-0.5f)) { } diff --git a/plugins/GSdx/GSRendererDX9.cpp b/plugins/GSdx/GSRendererDX9.cpp index fa078e7646..aba27de2f6 100644 --- a/plugins/GSdx/GSRendererDX9.cpp +++ b/plugins/GSdx/GSRendererDX9.cpp @@ -253,10 +253,10 @@ void GSRendererDX9::UpdateFBA(GSTexture* rt) GSVertexPT1 vertices[] = { - {GSVector4(dst.x, -dst.y, 0.5f, 1.0f), GSVector2(0, 0)}, - {GSVector4(dst.z, -dst.y, 0.5f, 1.0f), GSVector2(0, 0)}, - {GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(0, 0)}, - {GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(0, 0)}, + {GSVector4(dst.x, -dst.y, 0.5f, 1.0f), GSVector2(0)}, + {GSVector4(dst.z, -dst.y, 0.5f, 1.0f), GSVector2(0)}, + {GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(0)}, + {GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(0)}, }; dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices)); diff --git a/plugins/GSdx/GSVector.h b/plugins/GSdx/GSVector.h index 3da0ad1428..d4971475fb 100644 --- a/plugins/GSdx/GSVector.h +++ b/plugins/GSdx/GSVector.h @@ -55,6 +55,12 @@ public: { } + GSVector2T(T x) + { + this->x = x; + this->y = x; + } + GSVector2T(T x, T y) { this->x = x;