Commit cf4432c3 by Austin Kinross Committed by Geoff Lang

Disable some extensions on D3D11 Feature Level 9_3 which aren't supported

BUG=angle:858 Change-Id: Ib2b2b2b54ba25654ea80b5cb1c59b74ed0379b68 Reviewed-on: https://chromium-review.googlesource.com/239271Tested-by: 's avatarAustin Kinross <aukinros@microsoft.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent ab989891
...@@ -372,6 +372,40 @@ static bool GetInstancingSupport(D3D_FEATURE_LEVEL featureLevel) ...@@ -372,6 +372,40 @@ static bool GetInstancingSupport(D3D_FEATURE_LEVEL featureLevel)
} }
} }
static bool GetFramebufferMultisampleSupport(D3D_FEATURE_LEVEL featureLevel)
{
switch (featureLevel)
{
case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0: return true;
case D3D_FEATURE_LEVEL_9_3:
case D3D_FEATURE_LEVEL_9_2:
case D3D_FEATURE_LEVEL_9_1: return false;
default: UNREACHABLE(); return false;
}
}
static bool GetFramebufferBlitSupport(D3D_FEATURE_LEVEL featureLevel)
{
switch (featureLevel)
{
case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0: return true;
case D3D_FEATURE_LEVEL_9_3:
case D3D_FEATURE_LEVEL_9_2:
case D3D_FEATURE_LEVEL_9_1: return false;
default: UNREACHABLE(); return false;
}
}
static bool GetDerivativeInstructionSupport(D3D_FEATURE_LEVEL featureLevel) static bool GetDerivativeInstructionSupport(D3D_FEATURE_LEVEL featureLevel)
{ {
// http://msdn.microsoft.com/en-us/library/windows/desktop/bb509588.aspx states that shader model // http://msdn.microsoft.com/en-us/library/windows/desktop/bb509588.aspx states that shader model
...@@ -394,6 +428,23 @@ static bool GetDerivativeInstructionSupport(D3D_FEATURE_LEVEL featureLevel) ...@@ -394,6 +428,23 @@ static bool GetDerivativeInstructionSupport(D3D_FEATURE_LEVEL featureLevel)
} }
} }
static bool GetShaderTextureLODSupport(D3D_FEATURE_LEVEL featureLevel)
{
switch (featureLevel)
{
case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0: return true;
case D3D_FEATURE_LEVEL_9_3:
case D3D_FEATURE_LEVEL_9_2:
case D3D_FEATURE_LEVEL_9_1: return false;
default: UNREACHABLE(); return false;
}
}
static size_t GetMaximumSimultaneousRenderTargets(D3D_FEATURE_LEVEL featureLevel) static size_t GetMaximumSimultaneousRenderTargets(D3D_FEATURE_LEVEL featureLevel)
{ {
// From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx ID3D11Device::CreateInputLayout // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150.aspx ID3D11Device::CreateInputLayout
...@@ -979,13 +1030,13 @@ void GenerateCaps(ID3D11Device *device, gl::Caps *caps, gl::TextureCapsMap *text ...@@ -979,13 +1030,13 @@ void GenerateCaps(ID3D11Device *device, gl::Caps *caps, gl::TextureCapsMap *text
extensions->timerQuery = false; // Unimplemented extensions->timerQuery = false; // Unimplemented
extensions->robustness = true; extensions->robustness = true;
extensions->blendMinMax = true; extensions->blendMinMax = true;
extensions->framebufferBlit = true; extensions->framebufferBlit = GetFramebufferBlitSupport(featureLevel);
extensions->framebufferMultisample = true; extensions->framebufferMultisample = GetFramebufferMultisampleSupport(featureLevel);
extensions->maxSamples = maxSamples; extensions->maxSamples = maxSamples;
extensions->instancedArrays = GetInstancingSupport(featureLevel); extensions->instancedArrays = GetInstancingSupport(featureLevel);
extensions->packReverseRowOrder = true; extensions->packReverseRowOrder = true;
extensions->standardDerivatives = GetDerivativeInstructionSupport(featureLevel); extensions->standardDerivatives = GetDerivativeInstructionSupport(featureLevel);
extensions->shaderTextureLOD = true; extensions->shaderTextureLOD = GetShaderTextureLODSupport(featureLevel);
extensions->fragDepth = true; extensions->fragDepth = true;
extensions->textureUsage = true; // This could be false since it has no effect in D3D11 extensions->textureUsage = true; // This could be false since it has no effect in D3D11
extensions->translatedShaderSource = true; extensions->translatedShaderSource = true;
......
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