[spline/bezier]Add some gpu features flags for Instanced Tessellation.

This commit is contained in:
xebra 2017-01-31 23:21:22 +09:00
parent ce27f7b0b5
commit 159aa1415d
2 changed files with 14 additions and 0 deletions

View File

@ -580,6 +580,17 @@ void GPU_GLES::CheckGPUFeatures() {
features |= GPU_SUPPORTS_ANISOTROPY;
if (gl_extensions.EXT_gpu_shader4)
features |= GPU_SUPPORTS_INSTANCE_RENDERING;
int maxVertexTextureImageUnits;
glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &maxVertexTextureImageUnits);
if (maxVertexTextureImageUnits >= 3) // At least 3 for hardware tessellation
features |= GPU_SUPPORTS_VERTEX_TEXTURE_FETCH;
if (gl_extensions.ARB_texture_float || gl_extensions.OES_texture_float)
features |= GPU_SUPPORTS_TEXTURE_FLOAT;
// If we already have a 16-bit depth buffer, we don't need to round.
if (fbo_standard_z_depth() > 16) {
if (!g_Config.bHighQualityDepth && (features & GPU_SUPPORTS_ACCURATE_DEPTH) != 0) {

View File

@ -472,6 +472,9 @@ enum : u64 {
GPU_IS_MOBILE = FLAG_BIT(29),
GPU_PREFER_CPU_DOWNLOAD = FLAG_BIT(30),
GPU_PREFER_REVERSE_COLOR_ORDER = FLAG_BIT(31),
GPU_SUPPORTS_INSTANCE_RENDERING = FLAG_BIT(32),
GPU_SUPPORTS_VERTEX_TEXTURE_FETCH = FLAG_BIT(33),
GPU_SUPPORTS_TEXTURE_FLOAT = FLAG_BIT(34),
};
struct KnownVertexBounds {