KhronosGroup / WebGL

The Official Khronos WebGL Repository
Other
2.63k stars 668 forks source link

WebGL reports the wrong MAX_COMBINED_TEXTURE_IMAGE_UNITS? #2353

Open greggman opened 7 years ago

greggman commented 7 years ago

This probably doesn't matter but ... checking MAX_COMBINED_TEXTURE_IMAGE_UNITS on webglstats I see lots of GPUs that support up to 192 combined texture units but only support 32 fragment shader texture units and 32 vertex shader texture units.

Checking my own MBP on webglreport it reports 16 vertex texture units, 16 fragment texture unit but 80 combined texture units.

I'm guessing this issue comes from desktop GL where MAX_COMBINED_TEXTURE_IMAGE_UNITS is including other things like tesselation shaders and geometry shaders.

Does it make sense that WebGL and WebGL2 should never report a number higher than MAX_TEXTURE_IMAGE_UNITS + MAX_VERTEX_TEXTURE_IMAGE_UNITS for MAX_COMBINED_TEXTURE_IMAGE_UNITS?

Should that be specified or is it fine that it's reporting a number that makes no sense to WebGL?

kenrussell commented 7 years ago

Thanks for pointing this out Gregg. Yes, it seems reasonable to clamp MAX_COMBINED_TEXTURE_IMAGE_UNITS to a maximum of MAX_VERTEX_TEXTURE_IMAGE_UNITS + MAX_TEXTURE_IMAGE_UNITS. If you're up for adding a conformance test please do.