Commit c1fd4087 by Chris Forbes

Connect fragment shader outputs to raster operations stage

Bug: b/124177079 Change-Id: I0dbcd154c2a28c43d9895e264cc794fc2ed289f2 Reviewed-on: https://swiftshader-review.googlesource.com/c/25029Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Tested-by: 's avatarChris Forbes <chrisforbes@google.com>
parent c61271e5
......@@ -31,22 +31,15 @@ namespace sw
{
enableIndex = 0;
// For our own sanity, ensure color outputs are written,
// even if the shader neglects to write them.
for(int i = 0; i < RENDERTARGETS; i++)
{
if(state.targetFormat[i] != VK_FORMAT_UNDEFINED)
{
oC[i] = Vector4f(0.0f, 0.0f, 0.0f, 0.0f);
}
}
spirvShader->emit(&routine);
spirvShader->emitEpilog(&routine);
for(int i = 0; i < RENDERTARGETS; i++)
{
c[i] = oC[i];
c[i].x = routine.outputs[i * 4];
c[i].y = routine.outputs[i * 4 + 1];
c[i].z = routine.outputs[i * 4 + 2];
c[i].w = routine.outputs[i * 4 + 3];
}
clampColor(c);
......
......@@ -39,7 +39,6 @@ namespace sw
private:
// Color outputs
Vector4f c[RENDERTARGETS];
RegisterArray<RENDERTARGETS, true> oC;
// Per pixel based on conditions reached
Int enableIndex;
......
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