Only advertise postSubBuffer extension if we can actually present less than the whole buffer.

This is not available in D3D11, though it is added in D3D11.1. TRAC #22506 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1892 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 0bbb08d9
......@@ -500,7 +500,10 @@ void Display::initExtensionString()
mExtensionString += "EGL_ANGLE_surface_d3d_texture_2d_share_handle ";
}
mExtensionString += "EGL_NV_post_sub_buffer";
if (mRenderer->getPostSubBufferSupport())
{
mExtensionString += "EGL_NV_post_sub_buffer";
}
std::string::size_type end = mExtensionString.find_last_not_of(' ');
if (end != std::string::npos)
......
......@@ -167,6 +167,7 @@ class Renderer
virtual float getTextureMaxAnisotropy() const = 0;
virtual bool getShareHandleSupport() const = 0;
virtual bool getDerivativeInstructionSupport() const = 0;
virtual bool getPostSubBufferSupport() const = 0;
virtual int getMajorShaderModel() const = 0;
virtual float getMaxPointSize() const = 0;
......
......@@ -2235,6 +2235,12 @@ bool Renderer11::getDerivativeInstructionSupport() const
}
}
bool Renderer11::getPostSubBufferSupport() const
{
// D3D11 does not support present with dirty rectangles until D3D11.1 and DXGI 1.2.
return false;
}
int Renderer11::getMajorShaderModel() const
{
switch (mFeatureLevel)
......
......@@ -118,6 +118,7 @@ class Renderer11 : public Renderer
virtual float getTextureMaxAnisotropy() const;
virtual bool getShareHandleSupport() const;
virtual bool getDerivativeInstructionSupport() const;
virtual bool getPostSubBufferSupport() const;
virtual int getMajorShaderModel() const;
virtual float getMaxPointSize() const;
......
......@@ -2306,6 +2306,11 @@ bool Renderer9::getDerivativeInstructionSupport() const
return (mDeviceCaps.PS20Caps.Caps & D3DPS20CAPS_GRADIENTINSTRUCTIONS) != 0;
}
bool Renderer9::getPostSubBufferSupport() const
{
return true;
}
int Renderer9::getMajorShaderModel() const
{
return D3DSHADER_VERSION_MAJOR(mDeviceCaps.PixelShaderVersion);
......
......@@ -146,6 +146,7 @@ class Renderer9 : public Renderer
virtual float getTextureMaxAnisotropy() const;
virtual bool getShareHandleSupport() const;
virtual bool getDerivativeInstructionSupport() const;
virtual bool getPostSubBufferSupport() const;
virtual int getMajorShaderModel() const;
virtual float getMaxPointSize() const;
......
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