Commit 3b003a51 by Alexis Hetu Committed by Alexis Hétu

Removed SwiftShader's custom Viewport structure

- Replaced sw::Viewport with VkViewport Bug b/118386749 Change-Id: I2446883ba9e5623753322fc417386394a3fe370c Reviewed-on: https://swiftshader-review.googlesource.com/c/22909Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 67c93d20
......@@ -483,10 +483,10 @@ namespace sw
{
float W = 0.5f * viewport.width;
float H = 0.5f * viewport.height;
float X0 = viewport.x0 + W;
float Y0 = viewport.y0 + H;
float N = viewport.minZ;
float F = viewport.maxZ;
float X0 = viewport.x + W;
float Y0 = viewport.y + H;
float N = viewport.minDepth;
float F = viewport.maxDepth;
float Z = F - N;
if(context->isDrawTriangle())
......@@ -2291,7 +2291,7 @@ namespace sw
}
#endif
void Renderer::setViewport(const Viewport &viewport)
void Renderer::setViewport(const VkViewport &viewport)
{
this->viewport = viewport;
}
......
......@@ -192,16 +192,6 @@ namespace sw
float4 a2c3;
};
struct Viewport
{
float x0;
float y0;
float width;
float height;
float minZ;
float maxZ;
};
class Renderer : public VertexProcessor, public PixelProcessor, public SetupProcessor
{
struct Task
......@@ -315,7 +305,7 @@ namespace sw
void setVertexShaderConstantB(unsigned int index, const int *boolean, unsigned int count = 1);
// Viewport & Clipper
void setViewport(const Viewport &viewport);
void setViewport(const VkViewport &viewport);
void setScissor(const Rect &scissor);
void setClipFlags(int flags);
void setClipPlane(unsigned int index, const float plane[4]);
......@@ -372,7 +362,7 @@ namespace sw
Context *context;
Clipper *clipper;
Blitter *blitter;
Viewport viewport;
VkViewport viewport;
Rect scissor;
int clipFlags;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment