Commit 4ace423c by Geoff Lang

Disable dynamic pixel shader generation.

Always generate the same pixel shader no matter what framebuffer is bound. BUG=angle:670 Change-Id: I3fa91ff43363d49b38a19d3815ea523946c675d5 Reviewed-on: https://chromium-review.googlesource.com/204573Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent f91ce811
......@@ -424,7 +424,10 @@ std::string DynamicHLSL::generatePixelShaderForOutputSignature(const std::string
{
const PixelShaderOuputVariable& outputVariable = outputVariables[i];
ASSERT(outputLayout.size() > outputVariable.outputIndex);
if (outputLayout[outputVariable.outputIndex] != GL_NONE)
// FIXME(geofflang): Work around NVIDIA driver bug by repacking buffers
bool outputIndexEnabled = true; // outputLayout[outputVariable.outputIndex] != GL_NONE
if (outputIndexEnabled)
{
declarationHLSL += " " + gl_d3d::HLSLTypeString(outputVariable.type) + " " + outputVariable.name +
" : " + targetSemantic + Str(outputVariable.outputIndex) + ";\n";
......
......@@ -244,7 +244,9 @@ class ProgramBinary : public RefCountObject
PixelExecutable(const std::vector<GLenum> &outputSignature, rx::ShaderExecutable *shaderExecutable);
~PixelExecutable();
bool matchesSignature(const std::vector<GLenum> &signature) const { return mOutputSignature == signature; }
// FIXME(geofflang): Work around NVIDIA driver bug by repacking buffers
bool matchesSignature(const std::vector<GLenum> &signature) const { return true; /* mOutputSignature == signature; */ }
const std::vector<GLenum> &outputSignature() const { return mOutputSignature; }
rx::ShaderExecutable *shaderExecutable() const { return mShaderExecutable; }
......
......@@ -2234,20 +2234,7 @@ int Renderer11::getNearestSupportedSamples(DXGI_FORMAT format, unsigned int requ
unsigned int Renderer11::getMaxRenderTargets() const
{
META_ASSERT(D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS);
META_ASSERT(D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS);
switch (mFeatureLevel)
{
case D3D_FEATURE_LEVEL_11_0:
return D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; // 8
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
return D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; // 8
default:
UNREACHABLE();
return 1;
}
return d3d11::GetMaximumSimultaneousRenderTargets(mFeatureLevel);
}
bool Renderer11::copyToRenderTarget(TextureStorageInterface2D *dest, TextureStorageInterface2D *source)
......
......@@ -504,8 +504,9 @@ size_t GetMaximumSimultaneousRenderTargets(D3D_FEATURE_LEVEL featureLevel)
case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0: return D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT;
// FIXME(geofflang): Work around NVIDIA driver bug by repacking buffers
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0: return D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT;
case D3D_FEATURE_LEVEL_10_0: return 1; /* D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; */
case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT;
case D3D_FEATURE_LEVEL_9_2:
......
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