Commit da507fea by Geoff Lang

Refactored the ClearParameters type and moved Renderer11's clear logic into a Clear11 helper class.

TRAC #23475 Author: Geoff Lang Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
parent 646559fe
...@@ -291,6 +291,8 @@ ...@@ -291,6 +291,8 @@
'libGLESv2/renderer/BufferStorage9.h', 'libGLESv2/renderer/BufferStorage9.h',
'libGLESv2/renderer/BufferStorage11.cpp', 'libGLESv2/renderer/BufferStorage11.cpp',
'libGLESv2/renderer/BufferStorage11.h', 'libGLESv2/renderer/BufferStorage11.h',
'libGLESv2/renderer/Clear11.cpp',
'libGLESv2/renderer/Clear11.h',
'libGLESv2/renderer/FenceImpl.h', 'libGLESv2/renderer/FenceImpl.h',
'libGLESv2/renderer/Fence9.cpp', 'libGLESv2/renderer/Fence9.cpp',
'libGLESv2/renderer/Fence9.h', 'libGLESv2/renderer/Fence9.h',
......
...@@ -2466,8 +2466,25 @@ void Context::clear(GLbitfield mask) ...@@ -2466,8 +2466,25 @@ void Context::clear(GLbitfield mask)
return gl::error(GL_INVALID_FRAMEBUFFER_OPERATION); return gl::error(GL_INVALID_FRAMEBUFFER_OPERATION);
} }
DWORD flags = 0; ClearParameters clearParams = { 0 };
GLbitfield finalMask = 0;
for (unsigned int i = 0; i < ArraySize(clearParams.clearColor); i++)
{
clearParams.clearColor[i] = false;
}
clearParams.colorFClearValue = mState.colorClearValue;
clearParams.colorClearType = GL_FLOAT;
clearParams.colorMaskRed = mState.blend.colorMaskRed;
clearParams.colorMaskGreen = mState.blend.colorMaskGreen;
clearParams.colorMaskBlue = mState.blend.colorMaskBlue;
clearParams.colorMaskAlpha = mState.blend.colorMaskAlpha;
clearParams.clearDepth = false;
clearParams.depthClearValue = mState.depthClearValue;
clearParams.clearStencil = false;
clearParams.stencilClearValue = mState.stencilClearValue;
clearParams.stencilWriteMask = mState.depthStencil.stencilWritemask;
clearParams.scissorEnabled = mState.scissorTest;
clearParams.scissor = mState.scissor;
if (mask & GL_COLOR_BUFFER_BIT) if (mask & GL_COLOR_BUFFER_BIT)
{ {
...@@ -2475,7 +2492,10 @@ void Context::clear(GLbitfield mask) ...@@ -2475,7 +2492,10 @@ void Context::clear(GLbitfield mask)
if (framebufferObject->hasEnabledColorAttachment()) if (framebufferObject->hasEnabledColorAttachment())
{ {
finalMask |= GL_COLOR_BUFFER_BIT; for (unsigned int i = 0; i < ArraySize(clearParams.clearColor); i++)
{
clearParams.clearColor[i] = true;
}
} }
} }
...@@ -2484,7 +2504,7 @@ void Context::clear(GLbitfield mask) ...@@ -2484,7 +2504,7 @@ void Context::clear(GLbitfield mask)
mask &= ~GL_DEPTH_BUFFER_BIT; mask &= ~GL_DEPTH_BUFFER_BIT;
if (mState.depthStencil.depthMask && framebufferObject->getDepthbufferType() != GL_NONE) if (mState.depthStencil.depthMask && framebufferObject->getDepthbufferType() != GL_NONE)
{ {
finalMask |= GL_DEPTH_BUFFER_BIT; clearParams.clearDepth = true;
} }
} }
...@@ -2502,7 +2522,7 @@ void Context::clear(GLbitfield mask) ...@@ -2502,7 +2522,7 @@ void Context::clear(GLbitfield mask)
if (gl::GetStencilBits(depthStencil->getActualFormat(), mClientVersion) > 0) if (gl::GetStencilBits(depthStencil->getActualFormat(), mClientVersion) > 0)
{ {
finalMask |= GL_STENCIL_BUFFER_BIT; clearParams.clearStencil = true;
} }
} }
} }
...@@ -2517,17 +2537,6 @@ void Context::clear(GLbitfield mask) ...@@ -2517,17 +2537,6 @@ void Context::clear(GLbitfield mask)
return; return;
} }
ClearParameters clearParams;
clearParams.mask = finalMask;
clearParams.colorClearValue = mState.colorClearValue;
clearParams.colorMaskRed = mState.blend.colorMaskRed;
clearParams.colorMaskGreen = mState.blend.colorMaskGreen;
clearParams.colorMaskBlue = mState.blend.colorMaskBlue;
clearParams.colorMaskAlpha = mState.blend.colorMaskAlpha;
clearParams.depthClearValue = mState.depthClearValue;
clearParams.stencilClearValue = mState.stencilClearValue;
clearParams.stencilWriteMask = mState.depthStencil.stencilWritemask;
mRenderer->clear(clearParams, framebufferObject); mRenderer->clear(clearParams, framebufferObject);
} }
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#ifndef LIBGLESV2_ANGLETYPES_H_ #ifndef LIBGLESV2_ANGLETYPES_H_
#define LIBGLESV2_ANGLETYPES_H_ #define LIBGLESV2_ANGLETYPES_H_
#include "libGLESv2/constants.h"
namespace gl namespace gl
{ {
...@@ -150,18 +152,25 @@ struct SamplerState ...@@ -150,18 +152,25 @@ struct SamplerState
struct ClearParameters struct ClearParameters
{ {
GLbitfield mask; bool clearColor[gl::IMPLEMENTATION_MAX_DRAW_BUFFERS];
ColorF colorFClearValue;
ColorF colorClearValue; ColorI colorIClearValue;
ColorUI colorUIClearValue;
GLenum colorClearType;
bool colorMaskRed; bool colorMaskRed;
bool colorMaskGreen; bool colorMaskGreen;
bool colorMaskBlue; bool colorMaskBlue;
bool colorMaskAlpha; bool colorMaskAlpha;
bool clearDepth;
float depthClearValue; float depthClearValue;
bool clearStencil;
GLint stencilClearValue; GLint stencilClearValue;
GLuint stencilWriteMask; GLuint stencilWriteMask;
bool scissorEnabled;
Rectangle scissor;
}; };
} }
......
...@@ -270,6 +270,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -270,6 +270,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<ClCompile Include="RenderbufferProxySet.cpp" /> <ClCompile Include="RenderbufferProxySet.cpp" />
<ClCompile Include="renderer\Blit11.cpp" /> <ClCompile Include="renderer\Blit11.cpp" />
<ClCompile Include="renderer\Blit9.cpp" /> <ClCompile Include="renderer\Blit9.cpp" />
<ClCompile Include="renderer\Clear11.cpp" />
<ClCompile Include="renderer\copyimage.cpp" /> <ClCompile Include="renderer\copyimage.cpp" />
<ClCompile Include="renderer\Fence11.cpp" /> <ClCompile Include="renderer\Fence11.cpp" />
<ClCompile Include="renderer\Fence9.cpp" /> <ClCompile Include="renderer\Fence9.cpp" />
...@@ -353,6 +354,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -353,6 +354,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<ClInclude Include="RenderbufferProxySet.h" /> <ClInclude Include="RenderbufferProxySet.h" />
<ClInclude Include="renderer\Blit11.h" /> <ClInclude Include="renderer\Blit11.h" />
<ClInclude Include="renderer\Blit9.h" /> <ClInclude Include="renderer\Blit9.h" />
<ClInclude Include="renderer\Clear11.h" />
<ClInclude Include="renderer\copyimage.h" /> <ClInclude Include="renderer\copyimage.h" />
<ClInclude Include="renderer\Fence11.h" /> <ClInclude Include="renderer\Fence11.h" />
<ClInclude Include="renderer\Fence9.h" /> <ClInclude Include="renderer\Fence9.h" />
...@@ -390,9 +392,12 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -390,9 +392,12 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<ClInclude Include="renderer\ShaderExecutable.h" /> <ClInclude Include="renderer\ShaderExecutable.h" />
<ClInclude Include="renderer\ShaderExecutable11.h" /> <ClInclude Include="renderer\ShaderExecutable11.h" />
<ClInclude Include="renderer\ShaderExecutable9.h" /> <ClInclude Include="renderer\ShaderExecutable9.h" />
<ClInclude Include="renderer\shaders\compiled\clear11vs.h" /> <ClInclude Include="renderer\shaders\compiled\clearfloat11ps.h" />
<ClInclude Include="renderer\shaders\compiled\clearmultiple11ps.h" /> <ClInclude Include="renderer\shaders\compiled\clearfloat11vs.h" />
<ClInclude Include="renderer\shaders\compiled\clearsingle11ps.h" /> <ClInclude Include="renderer\shaders\compiled\clearsint11ps.h" />
<ClInclude Include="renderer\shaders\compiled\clearsint11vs.h" />
<ClInclude Include="renderer\shaders\compiled\clearuint11ps.h" />
<ClInclude Include="renderer\shaders\compiled\clearuint11vs.h" />
<ClInclude Include="renderer\shaders\compiled\componentmaskps.h" /> <ClInclude Include="renderer\shaders\compiled\componentmaskps.h" />
<ClInclude Include="renderer\shaders\compiled\flipyvs.h" /> <ClInclude Include="renderer\shaders\compiled\flipyvs.h" />
<ClInclude Include="renderer\shaders\compiled\luminanceps.h" /> <ClInclude Include="renderer\shaders\compiled\luminanceps.h" />
...@@ -405,6 +410,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -405,6 +410,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<ClInclude Include="renderer\shaders\compiled\passthroughlumalpha2d11ps.h" /> <ClInclude Include="renderer\shaders\compiled\passthroughlumalpha2d11ps.h" />
<ClInclude Include="renderer\shaders\compiled\passthroughlumalpha3d11ps.h" /> <ClInclude Include="renderer\shaders\compiled\passthroughlumalpha3d11ps.h" />
<ClInclude Include="renderer\shaders\compiled\passthroughps.h" /> <ClInclude Include="renderer\shaders\compiled\passthroughps.h" />
<ClInclude Include="renderer\shaders\compiled\passthroughr2d11ps.h" />
<ClInclude Include="renderer\shaders\compiled\passthroughr2di11ps.h" /> <ClInclude Include="renderer\shaders\compiled\passthroughr2di11ps.h" />
<ClInclude Include="renderer\shaders\compiled\passthroughr2dui11ps.h" /> <ClInclude Include="renderer\shaders\compiled\passthroughr2dui11ps.h" />
<ClInclude Include="renderer\shaders\compiled\passthroughr3d11ps.h" /> <ClInclude Include="renderer\shaders\compiled\passthroughr3d11ps.h" />
......
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Clear11.h: Framebuffer clear utility class.
#ifndef LIBGLESV2_RENDERER_CLEAR11_H_
#define LIBGLESV2_RENDERER_CLEAR11_H_
#include "libGLESv2/angletypes.h"
namespace gl
{
class Framebuffer;
}
namespace rx
{
class Renderer11;
class Clear11
{
public:
explicit Clear11(Renderer11 *renderer);
~Clear11();
// Clears the framebuffer with the supplied clear parameters, assumes that the framebuffer is currently applied.
void clearFramebuffer(const gl::ClearParameters &clearParams, gl::Framebuffer *frameBuffer);
private:
Renderer11 *mRenderer;
struct ClearBlendInfo
{
bool maskRed;
bool maskGreen;
bool maskBlue;
bool maskAlpha;
};
typedef bool (*ClearBlendInfoComparisonFunction)(const ClearBlendInfo&, const ClearBlendInfo &);
typedef std::map<ClearBlendInfo, ID3D11BlendState*, ClearBlendInfoComparisonFunction> ClearBlendStateMap;
ClearBlendStateMap mClearBlendStates;
ID3D11BlendState *getBlendState(const gl::ClearParameters &clearParams);
struct ClearShader
{
ID3D11InputLayout *inputLayout;
ID3D11VertexShader *vertexShader;
ID3D11PixelShader *pixelShader;
};
ClearShader mFloatClearShader;
ClearShader mUintClearShader;
ClearShader mIntClearShader;
template <unsigned int vsSize, unsigned int psSize>
static ClearShader CreateClearShader(ID3D11Device *device, DXGI_FORMAT colorType, const BYTE (&vsByteCode)[vsSize], const BYTE (&psByteCode)[psSize]);
struct ClearDepthStencilInfo
{
bool clearDepth;
bool clearStencil;
UINT8 stencilWriteMask;
};
typedef bool (*ClearDepthStencilInfoComparisonFunction)(const ClearDepthStencilInfo&, const ClearDepthStencilInfo &);
typedef std::map<ClearDepthStencilInfo, ID3D11DepthStencilState*, ClearDepthStencilInfoComparisonFunction> ClearDepthStencilStateMap;
ClearDepthStencilStateMap mClearDepthStencilStates;
ID3D11DepthStencilState *getDepthStencilState(const gl::ClearParameters &clearParams);
ID3D11Buffer *mVertexBuffer;
ID3D11RasterizerState *mRasterizerState;
};
}
#endif // LIBGLESV2_RENDERER_CLEAR11_H_
...@@ -30,6 +30,7 @@ class VertexDataManager; ...@@ -30,6 +30,7 @@ class VertexDataManager;
class IndexDataManager; class IndexDataManager;
class StreamingIndexBufferInterface; class StreamingIndexBufferInterface;
class Blit11; class Blit11;
class Clear11;
enum enum
{ {
...@@ -221,7 +222,6 @@ class Renderer11 : public Renderer ...@@ -221,7 +222,6 @@ class Renderer11 : public Renderer
GLenum format, GLenum type, GLsizei outputPitch, bool packReverseRowOrder, GLenum format, GLenum type, GLsizei outputPitch, bool packReverseRowOrder,
GLint packAlignment, void *pixels); GLint packAlignment, void *pixels);
void maskedClear(const gl::ClearParameters &clearParams, bool usingExtendedDrawBuffers);
rx::Range getViewportBounds() const; rx::Range getViewportBounds() const;
bool blitRenderbufferRect(const gl::Rectangle &readRect, const gl::Rectangle &drawRect, RenderTarget *readRenderTarget, bool blitRenderbufferRect(const gl::Rectangle &readRect, const gl::Rectangle &drawRect, RenderTarget *readRenderTarget,
...@@ -353,14 +353,7 @@ class Renderer11 : public Renderer ...@@ -353,14 +353,7 @@ class Renderer11 : public Renderer
Blit11 *mBlit; Blit11 *mBlit;
// Masked clear resources // Masked clear resources
bool mClearResourcesInitialized; Clear11 *mClear;
ID3D11Buffer *mClearVB;
ID3D11InputLayout *mClearIL;
ID3D11VertexShader *mClearVS;
ID3D11PixelShader *mClearSinglePS;
ID3D11PixelShader *mClearMultiplePS;
ID3D11RasterizerState *mClearScissorRS;
ID3D11RasterizerState *mClearNoScissorRS;
// Sync query // Sync query
ID3D11Query *mSyncQuery; ID3D11Query *mSyncQuery;
......
...@@ -1761,15 +1761,33 @@ void Renderer9::applyUniformnbv(gl::Uniform *targetUniform, const GLint *v) ...@@ -1761,15 +1761,33 @@ void Renderer9::applyUniformnbv(gl::Uniform *targetUniform, const GLint *v)
void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *frameBuffer) void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *frameBuffer)
{ {
D3DCOLOR color = D3DCOLOR_ARGB(gl::unorm<8>(clearParams.colorClearValue.alpha), if (clearParams.colorClearType != GL_FLOAT)
gl::unorm<8>(clearParams.colorClearValue.red), {
gl::unorm<8>(clearParams.colorClearValue.green), // Clearing buffers with non-float values is not supported by Renderer9 and ES 2.0
gl::unorm<8>(clearParams.colorClearValue.blue)); UNREACHABLE();
return;
}
bool clearColor = clearParams.clearColor[0];
for (unsigned int i = 0; i < ArraySize(clearParams.clearColor); i++)
{
if (clearParams.clearColor[i] != clearColor)
{
// Clearing individual buffers other than buffer zero is not supported by Renderer9 and ES 2.0
UNREACHABLE();
return;
}
}
D3DCOLOR color = D3DCOLOR_ARGB(gl::unorm<8>(clearParams.colorFClearValue.alpha),
gl::unorm<8>(clearParams.colorFClearValue.red),
gl::unorm<8>(clearParams.colorFClearValue.green),
gl::unorm<8>(clearParams.colorFClearValue.blue));
float depth = gl::clamp01(clearParams.depthClearValue); float depth = gl::clamp01(clearParams.depthClearValue);
int stencil = clearParams.stencilClearValue & 0x000000FF; int stencil = clearParams.stencilClearValue & 0x000000FF;
unsigned int stencilUnmasked = 0x0; unsigned int stencilUnmasked = 0x0;
if ((clearParams.mask & GL_STENCIL_BUFFER_BIT) && frameBuffer->hasStencil()) if (clearParams.clearStencil && frameBuffer->hasStencil())
{ {
unsigned int stencilSize = gl::GetStencilBits(frameBuffer->getStencilbuffer()->getActualFormat(), unsigned int stencilSize = gl::GetStencilBits(frameBuffer->getStencilbuffer()->getActualFormat(),
getCurrentClientVersion()); getCurrentClientVersion());
...@@ -1779,11 +1797,10 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f ...@@ -1779,11 +1797,10 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f
bool alphaUnmasked = gl::GetAlphaBits(mRenderTargetDesc.format, getCurrentClientVersion()) == 0 || bool alphaUnmasked = gl::GetAlphaBits(mRenderTargetDesc.format, getCurrentClientVersion()) == 0 ||
clearParams.colorMaskAlpha; clearParams.colorMaskAlpha;
const bool needMaskedStencilClear = (clearParams.mask & GL_STENCIL_BUFFER_BIT) && const bool needMaskedStencilClear = clearParams.clearStencil &&
(clearParams.stencilWriteMask & stencilUnmasked) != stencilUnmasked; (clearParams.stencilWriteMask & stencilUnmasked) != stencilUnmasked;
const bool needMaskedColorClear = (clearParams.mask & GL_COLOR_BUFFER_BIT) && const bool needMaskedColorClear = clearColor && !(clearParams.colorMaskRed && clearParams.colorMaskGreen &&
!(clearParams.colorMaskRed && clearParams.colorMaskGreen && clearParams.colorMaskBlue && alphaUnmasked);
clearParams.colorMaskBlue && alphaUnmasked);
if (needMaskedColorClear || needMaskedStencilClear) if (needMaskedColorClear || needMaskedStencilClear)
{ {
...@@ -1844,7 +1861,7 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f ...@@ -1844,7 +1861,7 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f
mDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); mDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
mDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, 0); mDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, 0);
if (clearParams.mask & GL_COLOR_BUFFER_BIT) if (clearColor)
{ {
mDevice->SetRenderState(D3DRS_COLORWRITEENABLE, mDevice->SetRenderState(D3DRS_COLORWRITEENABLE,
gl_d3d9::ConvertColorMask(clearParams.colorMaskRed, gl_d3d9::ConvertColorMask(clearParams.colorMaskRed,
...@@ -1857,7 +1874,7 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f ...@@ -1857,7 +1874,7 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f
mDevice->SetRenderState(D3DRS_COLORWRITEENABLE, 0); mDevice->SetRenderState(D3DRS_COLORWRITEENABLE, 0);
} }
if (stencilUnmasked != 0x0 && (clearParams.mask & GL_STENCIL_BUFFER_BIT)) if (stencilUnmasked != 0x0 && clearParams.clearStencil)
{ {
mDevice->SetRenderState(D3DRS_STENCILENABLE, TRUE); mDevice->SetRenderState(D3DRS_STENCILENABLE, TRUE);
mDevice->SetRenderState(D3DRS_TWOSIDEDSTENCILMODE, FALSE); mDevice->SetRenderState(D3DRS_TWOSIDEDSTENCILMODE, FALSE);
...@@ -1913,7 +1930,7 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f ...@@ -1913,7 +1930,7 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f
startScene(); startScene();
mDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float[4])); mDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, quad, sizeof(float[4]));
if (clearParams.mask & GL_DEPTH_BUFFER_BIT) if (clearParams.clearDepth)
{ {
mDevice->SetRenderState(D3DRS_ZENABLE, TRUE); mDevice->SetRenderState(D3DRS_ZENABLE, TRUE);
mDevice->SetRenderState(D3DRS_ZWRITEENABLE, TRUE); mDevice->SetRenderState(D3DRS_ZWRITEENABLE, TRUE);
...@@ -1925,18 +1942,18 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f ...@@ -1925,18 +1942,18 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f
mMaskedClearSavedState->Apply(); mMaskedClearSavedState->Apply();
} }
} }
else if (clearParams.mask) else if (clearColor || clearParams.clearDepth || clearParams.clearStencil)
{ {
DWORD dxClearFlags = 0; DWORD dxClearFlags = 0;
if (clearParams.mask & GL_COLOR_BUFFER_BIT) if (clearColor)
{ {
dxClearFlags |= D3DCLEAR_TARGET; dxClearFlags |= D3DCLEAR_TARGET;
} }
if (clearParams.mask & GL_DEPTH_BUFFER_BIT) if (clearParams.clearDepth)
{ {
dxClearFlags |= D3DCLEAR_ZBUFFER; dxClearFlags |= D3DCLEAR_ZBUFFER;
} }
if (clearParams.mask & GL_STENCIL_BUFFER_BIT) if (clearParams.clearStencil)
{ {
dxClearFlags |= D3DCLEAR_STENCIL; dxClearFlags |= D3DCLEAR_STENCIL;
} }
......
...@@ -237,18 +237,6 @@ void SetPositionLayerTexCoord3DVertex(PositionLayerTexCoord3DVertex* vertex, flo ...@@ -237,18 +237,6 @@ void SetPositionLayerTexCoord3DVertex(PositionLayerTexCoord3DVertex* vertex, flo
vertex->s = s; vertex->s = s;
} }
void SetPositionDepthColorVertex(PositionDepthColorVertex* vertex, float x, float y, float z,
const gl::ColorF &color)
{
vertex->x = x;
vertex->y = y;
vertex->z = z;
vertex->r = color.red;
vertex->g = color.green;
vertex->b = color.blue;
vertex->a = color.alpha;
}
HRESULT SetDebugName(ID3D11DeviceChild *resource, const char *name) HRESULT SetDebugName(ID3D11DeviceChild *resource, const char *name)
{ {
#if defined(_DEBUG) #if defined(_DEBUG)
......
...@@ -55,13 +55,25 @@ struct PositionLayerTexCoord3DVertex ...@@ -55,13 +55,25 @@ struct PositionLayerTexCoord3DVertex
void SetPositionLayerTexCoord3DVertex(PositionLayerTexCoord3DVertex* vertex, float x, float y, void SetPositionLayerTexCoord3DVertex(PositionLayerTexCoord3DVertex* vertex, float x, float y,
unsigned int layer, float u, float v, float s); unsigned int layer, float u, float v, float s);
template <typename T>
struct PositionDepthColorVertex struct PositionDepthColorVertex
{ {
float x, y, z; float x, y, z;
float r, g, b, a; T r, g, b, a;
}; };
void SetPositionDepthColorVertex(PositionDepthColorVertex* vertex, float x, float y, float z,
const gl::ColorF &color); template <typename T>
void SetPositionDepthColorVertex(PositionDepthColorVertex<T>* vertex, float x, float y, float z,
const gl::Color<T> &color)
{
vertex->x = x;
vertex->y = y;
vertex->z = z;
vertex->r = color.red;
vertex->g = color.green;
vertex->b = color.blue;
vertex->a = color.alpha;
}
HRESULT SetDebugName(ID3D11DeviceChild *resource, const char *name); HRESULT SetDebugName(ID3D11DeviceChild *resource, const char *name);
......
void VS_Clear( in float3 inPosition : POSITION, in float4 inColor : COLOR, // Assume we are in SM4+, which has 8 color outputs
out float4 outPosition : SV_POSITION, out float4 outColor : COLOR)
void VS_ClearFloat( in float3 inPosition : POSITION, in float4 inColor : COLOR,
out float4 outPosition : SV_POSITION, out float4 outColor : COLOR)
{ {
outPosition = float4(inPosition, 1.0f); outPosition = float4(inPosition, 1.0f);
outColor = inColor; outColor = inColor;
} }
// Assume we are in SM4+, which has 8 color outputs struct PS_OutputFloat
struct PS_OutputMultiple {
{ float4 color0 : SV_TARGET0;
float4 color0 : SV_TARGET0; float4 color1 : SV_TARGET1;
float4 color1 : SV_TARGET1; float4 color2 : SV_TARGET2;
float4 color2 : SV_TARGET2; float4 color3 : SV_TARGET3;
float4 color3 : SV_TARGET3; float4 color4 : SV_TARGET4;
float4 color4 : SV_TARGET4; float4 color5 : SV_TARGET5;
float4 color5 : SV_TARGET5; float4 color6 : SV_TARGET6;
float4 color6 : SV_TARGET6; float4 color7 : SV_TARGET7;
float4 color7 : SV_TARGET7; };
PS_OutputFloat PS_ClearFloat(in float4 inPosition : SV_POSITION, in float4 inColor : COLOR)
{
PS_OutputFloat outColor;
outColor.color0 = inColor;
outColor.color1 = inColor;
outColor.color2 = inColor;
outColor.color3 = inColor;
outColor.color4 = inColor;
outColor.color5 = inColor;
outColor.color6 = inColor;
outColor.color7 = inColor;
return outColor;
}
void VS_ClearUint( in float3 inPosition : POSITION, in uint4 inColor : COLOR,
out float4 outPosition : SV_POSITION, out uint4 outColor : COLOR)
{
outPosition = float4(inPosition, 1.0f);
outColor = inColor;
}
struct PS_OutputUint
{
uint4 color0 : SV_TARGET0;
uint4 color1 : SV_TARGET1;
uint4 color2 : SV_TARGET2;
uint4 color3 : SV_TARGET3;
uint4 color4 : SV_TARGET4;
uint4 color5 : SV_TARGET5;
uint4 color6 : SV_TARGET6;
uint4 color7 : SV_TARGET7;
}; };
PS_OutputMultiple PS_ClearMultiple(in float4 inPosition : SV_POSITION, in float4 inColor : COLOR) PS_OutputUint PS_ClearUint(in float4 inPosition : SV_POSITION, in uint4 inColor : COLOR)
{ {
PS_OutputMultiple outColor; PS_OutputUint outColor;
outColor.color0 = inColor; outColor.color0 = inColor;
outColor.color1 = inColor; outColor.color1 = inColor;
outColor.color2 = inColor; outColor.color2 = inColor;
outColor.color3 = inColor; outColor.color3 = inColor;
outColor.color4 = inColor; outColor.color4 = inColor;
outColor.color5 = inColor; outColor.color5 = inColor;
outColor.color6 = inColor; outColor.color6 = inColor;
outColor.color7 = inColor; outColor.color7 = inColor;
return outColor; return outColor;
} }
float4 PS_ClearSingle(in float4 inPosition : SV_Position, in float4 inColor : COLOR) : SV_Target0
void VS_ClearSint( in float3 inPosition : POSITION, in int4 inColor : COLOR,
out float4 outPosition : SV_POSITION, out int4 outColor : COLOR)
{
outPosition = float4(inPosition, 1.0f);
outColor = inColor;
}
struct PS_OutputSint
{
int4 color0 : SV_TARGET0;
int4 color1 : SV_TARGET1;
int4 color2 : SV_TARGET2;
int4 color3 : SV_TARGET3;
int4 color4 : SV_TARGET4;
int4 color5 : SV_TARGET5;
int4 color6 : SV_TARGET6;
int4 color7 : SV_TARGET7;
};
PS_OutputSint PS_ClearSint(in float4 inPosition : SV_POSITION, in int4 inColor : COLOR)
{ {
return inColor; PS_OutputSint outColor;
outColor.color0 = inColor;
outColor.color1 = inColor;
outColor.color2 = inColor;
outColor.color3 = inColor;
outColor.color4 = inColor;
outColor.color5 = inColor;
outColor.color6 = inColor;
outColor.color7 = inColor;
return outColor;
} }
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
// //
// //
// fxc /E PS_ClearMultiple /T ps_4_0 /Fh compiled/clearmultiple11ps.h // fxc /E PS_ClearFloat /T ps_4_0 /Fh compiled/clearfloat11ps.h Clear11.hlsl
// Clear11.hlsl
// //
// //
// //
...@@ -51,7 +50,7 @@ ret ...@@ -51,7 +50,7 @@ ret
// Approximately 9 instruction slots used // Approximately 9 instruction slots used
#endif #endif
const BYTE g_PS_ClearMultiple[] = const BYTE g_PS_ClearFloat[] =
{ {
68, 88, 66, 67, 146, 246, 68, 88, 66, 67, 146, 246,
236, 240, 50, 40, 87, 55, 236, 240, 50, 40, 87, 55,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
// //
// //
// fxc /E VS_Clear /T vs_4_0 /Fh compiled/clear11vs.h Clear11.hlsl // fxc /E VS_ClearFloat /T vs_4_0 /Fh compiled/clearfloat11vs.h Clear11.hlsl
// //
// //
// //
...@@ -34,7 +34,7 @@ ret ...@@ -34,7 +34,7 @@ ret
// Approximately 4 instruction slots used // Approximately 4 instruction slots used
#endif #endif
const BYTE g_VS_Clear[] = const BYTE g_VS_ClearFloat[] =
{ {
68, 88, 66, 67, 109, 138, 68, 88, 66, 67, 109, 138,
105, 83, 86, 190, 83, 125, 105, 83, 86, 190, 83, 125,
......
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// fxc /E PS_ClearSint /T ps_4_0 /Fh compiled/clearsint11ps.h Clear11.hlsl
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------
// SV_POSITION 0 xyzw 0 POS float
// COLOR 0 xyzw 1 NONE int xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------
// SV_TARGET 0 xyzw 0 TARGET int xyzw
// SV_TARGET 1 xyzw 1 TARGET int xyzw
// SV_TARGET 2 xyzw 2 TARGET int xyzw
// SV_TARGET 3 xyzw 3 TARGET int xyzw
// SV_TARGET 4 xyzw 4 TARGET int xyzw
// SV_TARGET 5 xyzw 5 TARGET int xyzw
// SV_TARGET 6 xyzw 6 TARGET int xyzw
// SV_TARGET 7 xyzw 7 TARGET int xyzw
//
ps_4_0
dcl_input_ps constant v1.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output o7.xyzw
mov o0.xyzw, v1.xyzw
mov o1.xyzw, v1.xyzw
mov o2.xyzw, v1.xyzw
mov o3.xyzw, v1.xyzw
mov o4.xyzw, v1.xyzw
mov o5.xyzw, v1.xyzw
mov o6.xyzw, v1.xyzw
mov o7.xyzw, v1.xyzw
ret
// Approximately 9 instruction slots used
#endif
const BYTE g_PS_ClearSint[] =
{
68, 88, 66, 67, 112, 6,
161, 37, 1, 215, 22, 223,
242, 200, 187, 209, 1, 11,
54, 202, 1, 0, 0, 0,
88, 3, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
140, 0, 0, 0, 224, 0,
0, 0, 188, 1, 0, 0,
220, 2, 0, 0, 82, 68,
69, 70, 80, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0,
28, 0, 0, 0, 77, 105,
99, 114, 111, 115, 111, 102,
116, 32, 40, 82, 41, 32,
72, 76, 83, 76, 32, 83,
104, 97, 100, 101, 114, 32,
67, 111, 109, 112, 105, 108,
101, 114, 32, 57, 46, 50,
57, 46, 57, 53, 50, 46,
51, 49, 49, 49, 0, 171,
171, 171, 73, 83, 71, 78,
76, 0, 0, 0, 2, 0,
0, 0, 8, 0, 0, 0,
56, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
68, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 1, 0,
0, 0, 15, 15, 0, 0,
83, 86, 95, 80, 79, 83,
73, 84, 73, 79, 78, 0,
67, 79, 76, 79, 82, 0,
171, 171, 79, 83, 71, 78,
212, 0, 0, 0, 8, 0,
0, 0, 8, 0, 0, 0,
200, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 1, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 2, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 3, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 4, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 5, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 6, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 6, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 7, 0,
0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 7, 0,
0, 0, 15, 0, 0, 0,
83, 86, 95, 84, 65, 82,
71, 69, 84, 0, 171, 171,
83, 72, 68, 82, 24, 1,
0, 0, 64, 0, 0, 0,
70, 0, 0, 0, 98, 8,
0, 3, 242, 16, 16, 0,
1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
0, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
2, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
3, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
4, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
5, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
6, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
7, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
0, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0,
54, 0, 0, 5, 242, 32,
16, 0, 1, 0, 0, 0,
70, 30, 16, 0, 1, 0,
0, 0, 54, 0, 0, 5,
242, 32, 16, 0, 2, 0,
0, 0, 70, 30, 16, 0,
1, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
3, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0,
54, 0, 0, 5, 242, 32,
16, 0, 4, 0, 0, 0,
70, 30, 16, 0, 1, 0,
0, 0, 54, 0, 0, 5,
242, 32, 16, 0, 5, 0,
0, 0, 70, 30, 16, 0,
1, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
6, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0,
54, 0, 0, 5, 242, 32,
16, 0, 7, 0, 0, 0,
70, 30, 16, 0, 1, 0,
0, 0, 62, 0, 0, 1,
83, 84, 65, 84, 116, 0,
0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0
};
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
// //
// //
// fxc /E PS_ClearSingle /T ps_4_0 /Fh compiled/clearsingle11ps.h // fxc /E VS_ClearSint /T vs_4_0 /Fh compiled/clearsint11vs.h Clear11.hlsl
// Clear11.hlsl
// //
// //
// //
...@@ -12,40 +11,45 @@ ...@@ -12,40 +11,45 @@
// //
// Name Index Mask Register SysValue Format Used // Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------ // -------------------- ----- ------ -------- -------- ------ ------
// SV_Position 0 xyzw 0 POS float // POSITION 0 xyz 0 NONE float xyz
// COLOR 0 xyzw 1 NONE float xyzw // COLOR 0 xyzw 1 NONE int xyzw
// //
// //
// Output signature: // Output signature:
// //
// Name Index Mask Register SysValue Format Used // Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------ // -------------------- ----- ------ -------- -------- ------ ------
// SV_Target 0 xyzw 0 TARGET float xyzw // SV_POSITION 0 xyzw 0 POS float xyzw
// COLOR 0 xyzw 1 NONE int xyzw
// //
ps_4_0 vs_4_0
dcl_input_ps linear v1.xyzw dcl_input v0.xyz
dcl_output o0.xyzw dcl_input v1.xyzw
mov o0.xyzw, v1.xyzw dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
mov o0.xyz, v0.xyzx
mov o0.w, l(1.000000)
mov o1.xyzw, v1.xyzw
ret ret
// Approximately 2 instruction slots used // Approximately 4 instruction slots used
#endif #endif
const BYTE g_PS_ClearSingle[] = const BYTE g_VS_ClearSint[] =
{ {
68, 88, 66, 67, 11, 49, 68, 88, 66, 67, 70, 247,
220, 157, 35, 106, 175, 161, 203, 223, 152, 212, 204, 15,
180, 178, 147, 150, 134, 162, 1, 237, 13, 201, 108, 151,
222, 79, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0,
208, 1, 0, 0, 5, 0, 48, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0, 0, 0, 52, 0, 0, 0,
140, 0, 0, 0, 224, 0, 140, 0, 0, 0, 220, 0,
0, 0, 20, 1, 0, 0, 0, 0, 48, 1, 0, 0,
84, 1, 0, 0, 82, 68, 180, 1, 0, 0, 82, 68,
69, 70, 80, 0, 0, 0, 69, 70, 80, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
28, 0, 0, 0, 0, 4, 28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0, 254, 255, 0, 1, 0, 0,
28, 0, 0, 0, 77, 105, 28, 0, 0, 0, 77, 105,
99, 114, 111, 115, 111, 102, 99, 114, 111, 115, 111, 102,
116, 32, 40, 82, 41, 32, 116, 32, 40, 82, 41, 32,
...@@ -56,43 +60,59 @@ const BYTE g_PS_ClearSingle[] = ...@@ -56,43 +60,59 @@ const BYTE g_PS_ClearSingle[] =
57, 46, 57, 53, 50, 46, 57, 46, 57, 53, 50, 46,
51, 49, 49, 49, 0, 171, 51, 49, 49, 49, 0, 171,
171, 171, 73, 83, 71, 78, 171, 171, 73, 83, 71, 78,
76, 0, 0, 0, 2, 0, 72, 0, 0, 0, 2, 0,
0, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0,
56, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0, 0, 0, 7, 7, 0, 0,
68, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0,
0, 0, 15, 15, 0, 0, 0, 0, 15, 15, 0, 0,
83, 86, 95, 80, 111, 115, 80, 79, 83, 73, 84, 73,
105, 116, 105, 111, 110, 0, 79, 78, 0, 67, 79, 76,
67, 79, 76, 79, 82, 0, 79, 82, 0, 171, 79, 83,
171, 171, 79, 83, 71, 78, 71, 78, 76, 0, 0, 0,
44, 0, 0, 0, 1, 0, 2, 0, 0, 0, 8, 0,
0, 0, 8, 0, 0, 0, 0, 0, 56, 0, 0, 0,
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0,
0, 0, 15, 0, 0, 0, 0, 0, 68, 0, 0, 0,
83, 86, 95, 84, 97, 114, 0, 0, 0, 0, 0, 0,
103, 101, 116, 0, 171, 171, 0, 0, 2, 0, 0, 0,
83, 72, 68, 82, 56, 0, 1, 0, 0, 0, 15, 0,
0, 0, 64, 0, 0, 0, 0, 0, 83, 86, 95, 80,
14, 0, 0, 0, 98, 16, 79, 83, 73, 84, 73, 79,
0, 3, 242, 16, 16, 0, 78, 0, 67, 79, 76, 79,
1, 0, 0, 0, 101, 0, 82, 0, 171, 171, 83, 72,
0, 3, 242, 32, 16, 0, 68, 82, 124, 0, 0, 0,
0, 0, 0, 0, 54, 0, 64, 0, 1, 0, 31, 0,
0, 0, 95, 0, 0, 3,
114, 16, 16, 0, 0, 0,
0, 0, 95, 0, 0, 3,
242, 16, 16, 0, 1, 0,
0, 0, 103, 0, 0, 4,
242, 32, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 1, 0, 0, 0,
54, 0, 0, 5, 114, 32,
16, 0, 0, 0, 0, 0,
70, 18, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
130, 32, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 54, 0,
0, 5, 242, 32, 16, 0, 0, 5, 242, 32, 16, 0,
0, 0, 0, 0, 70, 30, 1, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0, 16, 0, 1, 0, 0, 0,
62, 0, 0, 1, 83, 84, 62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0, 65, 84, 116, 0, 0, 0,
2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
...@@ -102,7 +122,7 @@ const BYTE g_PS_ClearSingle[] = ...@@ -102,7 +122,7 @@ const BYTE g_PS_ClearSingle[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
......
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// fxc /E PS_ClearUint /T ps_4_0 /Fh compiled/clearuint11ps.h Clear11.hlsl
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------
// SV_POSITION 0 xyzw 0 POS float
// COLOR 0 xyzw 1 NONE uint xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------
// SV_TARGET 0 xyzw 0 TARGET uint xyzw
// SV_TARGET 1 xyzw 1 TARGET uint xyzw
// SV_TARGET 2 xyzw 2 TARGET uint xyzw
// SV_TARGET 3 xyzw 3 TARGET uint xyzw
// SV_TARGET 4 xyzw 4 TARGET uint xyzw
// SV_TARGET 5 xyzw 5 TARGET uint xyzw
// SV_TARGET 6 xyzw 6 TARGET uint xyzw
// SV_TARGET 7 xyzw 7 TARGET uint xyzw
//
ps_4_0
dcl_input_ps constant v1.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output o7.xyzw
mov o0.xyzw, v1.xyzw
mov o1.xyzw, v1.xyzw
mov o2.xyzw, v1.xyzw
mov o3.xyzw, v1.xyzw
mov o4.xyzw, v1.xyzw
mov o5.xyzw, v1.xyzw
mov o6.xyzw, v1.xyzw
mov o7.xyzw, v1.xyzw
ret
// Approximately 9 instruction slots used
#endif
const BYTE g_PS_ClearUint[] =
{
68, 88, 66, 67, 160, 0,
119, 124, 89, 230, 58, 176,
111, 216, 39, 247, 181, 152,
98, 80, 1, 0, 0, 0,
88, 3, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
140, 0, 0, 0, 224, 0,
0, 0, 188, 1, 0, 0,
220, 2, 0, 0, 82, 68,
69, 70, 80, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0,
28, 0, 0, 0, 77, 105,
99, 114, 111, 115, 111, 102,
116, 32, 40, 82, 41, 32,
72, 76, 83, 76, 32, 83,
104, 97, 100, 101, 114, 32,
67, 111, 109, 112, 105, 108,
101, 114, 32, 57, 46, 50,
57, 46, 57, 53, 50, 46,
51, 49, 49, 49, 0, 171,
171, 171, 73, 83, 71, 78,
76, 0, 0, 0, 2, 0,
0, 0, 8, 0, 0, 0,
56, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
68, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 15, 15, 0, 0,
83, 86, 95, 80, 79, 83,
73, 84, 73, 79, 78, 0,
67, 79, 76, 79, 82, 0,
171, 171, 79, 83, 71, 78,
212, 0, 0, 0, 8, 0,
0, 0, 8, 0, 0, 0,
200, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 2, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 2, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 3, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 4, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 4, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 5, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 5, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 6, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 6, 0,
0, 0, 15, 0, 0, 0,
200, 0, 0, 0, 7, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 7, 0,
0, 0, 15, 0, 0, 0,
83, 86, 95, 84, 65, 82,
71, 69, 84, 0, 171, 171,
83, 72, 68, 82, 24, 1,
0, 0, 64, 0, 0, 0,
70, 0, 0, 0, 98, 8,
0, 3, 242, 16, 16, 0,
1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
0, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
2, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
3, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
4, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
5, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
6, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
7, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
0, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0,
54, 0, 0, 5, 242, 32,
16, 0, 1, 0, 0, 0,
70, 30, 16, 0, 1, 0,
0, 0, 54, 0, 0, 5,
242, 32, 16, 0, 2, 0,
0, 0, 70, 30, 16, 0,
1, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
3, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0,
54, 0, 0, 5, 242, 32,
16, 0, 4, 0, 0, 0,
70, 30, 16, 0, 1, 0,
0, 0, 54, 0, 0, 5,
242, 32, 16, 0, 5, 0,
0, 0, 70, 30, 16, 0,
1, 0, 0, 0, 54, 0,
0, 5, 242, 32, 16, 0,
6, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0,
54, 0, 0, 5, 242, 32,
16, 0, 7, 0, 0, 0,
70, 30, 16, 0, 1, 0,
0, 0, 62, 0, 0, 1,
83, 84, 65, 84, 116, 0,
0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// fxc /E VS_ClearUint /T vs_4_0 /Fh compiled/clearuint11vs.h Clear11.hlsl
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------
// POSITION 0 xyz 0 NONE float xyz
// COLOR 0 xyzw 1 NONE uint xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------
// SV_POSITION 0 xyzw 0 POS float xyzw
// COLOR 0 xyzw 1 NONE uint xyzw
//
vs_4_0
dcl_input v0.xyz
dcl_input v1.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
mov o0.xyz, v0.xyzx
mov o0.w, l(1.000000)
mov o1.xyzw, v1.xyzw
ret
// Approximately 4 instruction slots used
#endif
const BYTE g_VS_ClearUint[] =
{
68, 88, 66, 67, 225, 95,
94, 158, 52, 154, 110, 112,
150, 230, 100, 6, 119, 67,
189, 150, 1, 0, 0, 0,
48, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
140, 0, 0, 0, 220, 0,
0, 0, 48, 1, 0, 0,
180, 1, 0, 0, 82, 68,
69, 70, 80, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
28, 0, 0, 0, 0, 4,
254, 255, 0, 1, 0, 0,
28, 0, 0, 0, 77, 105,
99, 114, 111, 115, 111, 102,
116, 32, 40, 82, 41, 32,
72, 76, 83, 76, 32, 83,
104, 97, 100, 101, 114, 32,
67, 111, 109, 112, 105, 108,
101, 114, 32, 57, 46, 50,
57, 46, 57, 53, 50, 46,
51, 49, 49, 49, 0, 171,
171, 171, 73, 83, 71, 78,
72, 0, 0, 0, 2, 0,
0, 0, 8, 0, 0, 0,
56, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 7, 7, 0, 0,
65, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 15, 15, 0, 0,
80, 79, 83, 73, 84, 73,
79, 78, 0, 67, 79, 76,
79, 82, 0, 171, 79, 83,
71, 78, 76, 0, 0, 0,
2, 0, 0, 0, 8, 0,
0, 0, 56, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 3, 0, 0, 0,
0, 0, 0, 0, 15, 0,
0, 0, 68, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 15, 0,
0, 0, 83, 86, 95, 80,
79, 83, 73, 84, 73, 79,
78, 0, 67, 79, 76, 79,
82, 0, 171, 171, 83, 72,
68, 82, 124, 0, 0, 0,
64, 0, 1, 0, 31, 0,
0, 0, 95, 0, 0, 3,
114, 16, 16, 0, 0, 0,
0, 0, 95, 0, 0, 3,
242, 16, 16, 0, 1, 0,
0, 0, 103, 0, 0, 4,
242, 32, 16, 0, 0, 0,
0, 0, 1, 0, 0, 0,
101, 0, 0, 3, 242, 32,
16, 0, 1, 0, 0, 0,
54, 0, 0, 5, 114, 32,
16, 0, 0, 0, 0, 0,
70, 18, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
130, 32, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 54, 0,
0, 5, 242, 32, 16, 0,
1, 0, 0, 0, 70, 30,
16, 0, 1, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0
};
...@@ -47,6 +47,11 @@ fxc /E PS_PassthroughR3DI /T ps_4_0 /Fh compiled/passthroughr3di11ps.h Passthrou ...@@ -47,6 +47,11 @@ fxc /E PS_PassthroughR3DI /T ps_4_0 /Fh compiled/passthroughr3di11ps.h Passthrou
fxc /E PS_PassthroughLum3D /T ps_4_0 /Fh compiled/passthroughlum3d11ps.h Passthrough3D11.hlsl fxc /E PS_PassthroughLum3D /T ps_4_0 /Fh compiled/passthroughlum3d11ps.h Passthrough3D11.hlsl
fxc /E PS_PassthroughLumAlpha3D /T ps_4_0 /Fh compiled/passthroughlumalpha3d11ps.h Passthrough3D11.hlsl fxc /E PS_PassthroughLumAlpha3D /T ps_4_0 /Fh compiled/passthroughlumalpha3d11ps.h Passthrough3D11.hlsl
fxc /E VS_Clear /T vs_4_0 /Fh compiled/clear11vs.h Clear11.hlsl fxc /E VS_ClearFloat /T vs_4_0 /Fh compiled/clearfloat11vs.h Clear11.hlsl
fxc /E PS_ClearSingle /T ps_4_0 /Fh compiled/clearsingle11ps.h Clear11.hlsl fxc /E PS_ClearFloat /T ps_4_0 /Fh compiled/clearfloat11ps.h Clear11.hlsl
fxc /E PS_ClearMultiple /T ps_4_0 /Fh compiled/clearmultiple11ps.h Clear11.hlsl
fxc /E VS_ClearUint /T vs_4_0 /Fh compiled/clearuint11vs.h Clear11.hlsl
fxc /E PS_ClearUint /T ps_4_0 /Fh compiled/clearuint11ps.h Clear11.hlsl
fxc /E VS_ClearSint /T vs_4_0 /Fh compiled/clearsint11vs.h Clear11.hlsl
fxc /E PS_ClearSint /T ps_4_0 /Fh compiled/clearsint11ps.h Clear11.hlsl
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