Skip to content

Commit ef03acd

Browse files
committed
Increase default maxDrawBuffers
Glslang has default of 32. Vulkan driver on Pixel in Android N has maxFragmentOutputAttachments of 8.
1 parent 2f68ce7 commit ef03acd

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

glslc/test/parameter_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class LimitsHelp(expect.StdoutMatch, expect.StderrMatch):
254254
MaxCombinedTextureImageUnits 80
255255
MaxTextureImageUnits 16
256256
MaxFragmentUniformComponents 1024
257-
MaxDrawBuffers 4
257+
MaxDrawBuffers 8
258258
MaxVertexUniformVectors 256
259259
MaxVaryingVectors 15
260260
MaxFragmentUniformVectors 256

libshaderc_util/src/resources.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ const TBuiltInResource kDefaultTBuiltInResource = {
3232
/*.maxCombinedTextureImageUnits = */ 80,
3333
/*.maxTextureImageUnits = */ 16,
3434
/*.maxFragmentUniformComponents = */ 1024,
35-
/*.maxDrawBuffers = */ 4,
35+
36+
// glslang has 32 maxDrawBuffers.
37+
// Pixel phone Vulkan driver in Android N has 8
38+
// maxFragmentOutputAttachments.
39+
/*.maxDrawBuffers = */ 8,
40+
3641
/*.maxVertexUniformVectors = */ 256,
3742
/*.maxVaryingVectors = */ 15, // From OpenGLES 3.1 table 6.44.
3843
/*.maxFragmentUniformVectors = */ 256,

0 commit comments

Comments
 (0)