GSVector: Add constructor to dispatch same values

This commit is contained in:
Akash 2016-10-13 14:55:48 +05:30 committed by Gregory Hainaut
parent 85fe24cede
commit 055f236aa5
6 changed files with 15 additions and 9 deletions

View File

@ -126,8 +126,8 @@ public:
VSConstantBuffer() VSConstantBuffer()
{ {
Vertex_Scale_Offset = GSVector4::zero(); Vertex_Scale_Offset = GSVector4::zero();
DepthMask = GSVector2i(0, 0); DepthMask = GSVector2i(0);
PointSize = GSVector2(0, 0); PointSize = GSVector2(0);
} }
__forceinline bool Update(const VSConstantBuffer* cb) __forceinline bool Update(const VSConstantBuffer* cb)

View File

@ -231,7 +231,7 @@ bool GSRenderer::Merge(int field)
src[i] = GSVector4(r) * scale / GSVector4(tex[i]->GetSize()).xyxy(); 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(); 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 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); GSVector2i frame_diff(fr[i].left - frame_baseline.x, fr[i].top - frame_baseline.y);

View File

@ -58,7 +58,7 @@ protected:
GSDeviceDX::PSConstantBuffer ps_cb; GSDeviceDX::PSConstantBuffer ps_cb;
public: public:
GSRendererDX(GSTextureCache* tc, const GSVector2& pixelcenter = GSVector2(0, 0)); GSRendererDX(GSTextureCache* tc, const GSVector2& pixelcenter = GSVector2(0));
virtual ~GSRendererDX(); virtual ~GSRendererDX();
}; };

View File

@ -25,7 +25,7 @@
#include "resource.h" #include "resource.h"
GSRendererDX11::GSRendererDX11() GSRendererDX11::GSRendererDX11()
: GSRendererDX(new GSTextureCache11(this), GSVector2(-0.5f, -0.5f)) : GSRendererDX(new GSTextureCache11(this), GSVector2(-0.5f))
{ {
} }

View File

@ -253,10 +253,10 @@ void GSRendererDX9::UpdateFBA(GSTexture* rt)
GSVertexPT1 vertices[] = GSVertexPT1 vertices[] =
{ {
{GSVector4(dst.x, -dst.y, 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, 0)}, {GSVector4(dst.z, -dst.y, 0.5f, 1.0f), GSVector2(0)},
{GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(0, 0)}, {GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(0)},
{GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(0, 0)}, {GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(0)},
}; };
dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices)); dev->IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));

View File

@ -55,6 +55,12 @@ public:
{ {
} }
GSVector2T(T x)
{
this->x = x;
this->y = x;
}
GSVector2T(T x, T y) GSVector2T(T x, T y)
{ {
this->x = x; this->x = x;