Commit 194a9674 by Tobin Ehlis Committed by Commit Bot

Vulkan:Return HW's SUBPIXEL_BITS

Plumb the physical HW's subPixelPrecisionBits limit to be returned in the query for GL_SUBPIXEL_BITS. Default value remains 4 for all other backends. Bug: angleproject:3351 Change-Id: I5564e5090e7211b8daeaa91ea30eceb23c5ea227 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553967Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
parent 5f388c24
...@@ -1079,6 +1079,8 @@ Caps::Caps() ...@@ -1079,6 +1079,8 @@ Caps::Caps()
maxGeometryTotalOutputComponents(0), maxGeometryTotalOutputComponents(0),
maxGeometryShaderInvocations(0), maxGeometryShaderInvocations(0),
subPixelBits(4),
// GLES1 emulation: Table 6.20 / 6.22 (ES 1.1 spec) // GLES1 emulation: Table 6.20 / 6.22 (ES 1.1 spec)
maxMultitextureUnits(0), maxMultitextureUnits(0),
maxClipPlanes(0), maxClipPlanes(0),
......
...@@ -693,6 +693,8 @@ struct Caps ...@@ -693,6 +693,8 @@ struct Caps
GLuint maxGeometryTotalOutputComponents; GLuint maxGeometryTotalOutputComponents;
GLuint maxGeometryShaderInvocations; GLuint maxGeometryShaderInvocations;
GLuint subPixelBits;
// GLES1 emulation: Caps for ES 1.1. Taken from Table 6.20 / 6.22 in the OpenGL ES 1.1 spec. // GLES1 emulation: Caps for ES 1.1. Taken from Table 6.20 / 6.22 in the OpenGL ES 1.1 spec.
GLuint maxMultitextureUnits; GLuint maxMultitextureUnits;
GLuint maxClipPlanes; GLuint maxClipPlanes;
......
...@@ -1462,7 +1462,7 @@ void Context::getIntegervImpl(GLenum pname, GLint *params) ...@@ -1462,7 +1462,7 @@ void Context::getIntegervImpl(GLenum pname, GLint *params)
*params = mState.mCaps.maxDrawBuffers; *params = mState.mCaps.maxDrawBuffers;
break; break;
case GL_SUBPIXEL_BITS: case GL_SUBPIXEL_BITS:
*params = 4; *params = mState.mCaps.subPixelBits;
break; break;
case GL_MAX_TEXTURE_SIZE: case GL_MAX_TEXTURE_SIZE:
*params = mState.mCaps.max2DTextureSize; *params = mState.mCaps.max2DTextureSize;
......
...@@ -194,6 +194,8 @@ void RendererVk::ensureCapsInitialized() const ...@@ -194,6 +194,8 @@ void RendererVk::ensureCapsInitialized() const
mNativeCaps.maxVaryingVectors = mNativeCaps.maxVaryingVectors =
(mPhysicalDeviceProperties.limits.maxVertexOutputComponents / 4) - kReservedVaryingCount; (mPhysicalDeviceProperties.limits.maxVertexOutputComponents / 4) - kReservedVaryingCount;
mNativeCaps.maxVertexOutputComponents = mNativeCaps.maxVaryingVectors * 4; mNativeCaps.maxVertexOutputComponents = mNativeCaps.maxVaryingVectors * 4;
mNativeCaps.subPixelBits = mPhysicalDeviceProperties.limits.subPixelPrecisionBits;
} }
namespace egl_vk namespace egl_vk
......
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