Commit 533f0a1d by Jamie Madill

Do not check format caps for D3DFMT_NULL.

On AMD systems the driver was reporting these textures as usable. This was causing crashes in the sRGB extension tests. BUG=angle:839 Change-Id: I8e9924ed44f82a2a6bc891d1df76c0f9a19084ad Reviewed-on: https://chromium-review.googlesource.com/232062Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent ce260bb4
......@@ -67,6 +67,8 @@ struct TextureFormat
};
const TextureFormat &GetTextureFormatInfo(GLenum internalFormat);
extern const D3DFORMAT D3DFMT_NULL;
}
}
......
......@@ -276,6 +276,9 @@ static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, IDirect3
const d3d9::TextureFormat &d3dFormatInfo = d3d9::GetTextureFormatInfo(internalFormat);
const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(internalFormat);
if (d3dFormatInfo.texFormat != d3d9::D3DFMT_NULL)
{
if (formatInfo.depthBits > 0 || formatInfo.stencilBits > 0)
{
textureCaps.texturable = SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat, 0, D3DRTYPE_TEXTURE, d3dFormatInfo.texFormat));
......@@ -301,6 +304,7 @@ static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, IDirect3
textureCaps.sampleCounts.insert(i);
}
}
}
return textureCaps;
}
......
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