Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL_INVALID_OPERATION #423

Closed
wants to merge 1 commit into from
Closed

GL_INVALID_OPERATION #423

wants to merge 1 commit into from

Conversation

roeas
Copy link
Contributor

@roeas roeas commented Nov 27, 2023

Crash when compute shader dispatch.
image
Some outputs that might be useful:

(0) : error C7624: OpenGL does not allow greater than 8 image uniforms

F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Compute Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL35: GL34, GL0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5036): BGFX 0: Compute info
------------
(0) : error C7624: OpenGL does not allow greater than 8 image uniforms

F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Compute Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL36: GL35, GL0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 36
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (1):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_UNSIGNED_INT_VEC3 gl_GlobalInvocationID is at location -1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (7):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5286): BGFX WARN User defined uniform 's_scattering_density' is not found, it won't be set.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_IMAGE_3D s_scattering_density is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #1 at location 1.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5286): BGFX WARN User defined uniform 's_textureIrradiance_LUT' is not found, it won't be set.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_IMAGE_2D s_textureIrradiance_LUT is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #2 at location 2.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5286): BGFX WARN User defined uniform 's_textureMultipleScattering_LUT' is not found, it won't be set.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_IMAGE_3D s_textureMultipleScattering_LUT is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #3 at location 3.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5286): BGFX WARN User defined uniform 's_textureSingleMieScattering_LUT' is not found, it won't be set.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_IMAGE_3D s_textureSingleMieScattering_LUT is at location 3, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #4 at location 4.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5286): BGFX WARN User defined uniform 's_textureSingleRayleighScattering_LUT' is not found, it won't be set.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_IMAGE_3D s_textureSingleRayleighScattering_LUT is at location 4, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #5 at location 5.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5286): BGFX WARN User defined uniform 's_textureTransmittance_LUT' is not found, it won't be set.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_IMAGE_2D s_textureTransmittance_LUT is at location 5, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_numScatteringOrders 8
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_numScatteringOrders is at location 6, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Compute Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL38: GL37, GL0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5036): BGFX 0: Compute info
------------
(0) : error C7624: OpenGL does not allow greater than 8 image uniforms

F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Compute Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL39: GL38, GL0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5036): BGFX 0: Compute info
------------
(0) : error C7624: OpenGL does not allow greater than 8 image uniforms

F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    13: BC7 (requested: BC7), layers 1, 400x400x0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX TextureCube  14: RGBA16F (requested: RGBA16F), layers 1, 256x256x6.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Vertex Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL41: GL39, GL40
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 41
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (1):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (1):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Vertex Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL44: GL42, GL43
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 44
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_INT_VEC4 a_indices is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC4 a_weight is at location 2
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5211): BGFX --- u_boneMatrices
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5286): BGFX WARN User defined uniform 'u_boneMatrices' is not found, it won't be set.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_boneMatrices is at location 0, size 128, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5211): BGFX --- u_model
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_model* is at location 128, size 32, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 160, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_indices: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_weight: 2
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Vertex Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL47: GL45, GL46
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 47
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (1):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 2
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5211): BGFX --- u_model
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_model* is at location 0, size 32, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 32, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 2
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL49: GL39, GL48
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 49
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (1):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (1):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Vertex Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL52: GL50, GL51
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 52
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC2 a_texcoord0 is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_texture 20
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_texture is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_luminanceThreshold 25
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_luminanceThreshold is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_texcoord0: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL54: GL50, GL53
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 54
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC2 a_texcoord0 is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_texture 20
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_texture is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_textureSize 23
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_textureSize is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_texcoord0: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL56: GL50, GL55
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 56
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC2 a_texcoord0 is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_texture 20
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_texture is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_textureSize 23
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_textureSize is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_texcoord0: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL58: GL50, GL57
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 58
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC2 a_texcoord0 is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_texture 20
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_texture is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_textureSize 23
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_textureSize is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_texcoord0: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL60: GL50, GL59
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 60
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC2 a_texcoord0 is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (4):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_texture 20
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_texture is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_bloomIntensity 24
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_bloomIntensity is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_textureSize 23
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_textureSize is at location 3, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_texcoord0: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL62: GL50, GL61
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 62
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC2 a_texcoord0 is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_texture 20
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_texture is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_textureSize 23
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_textureSize is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_texcoord0: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL64: GL50, GL63
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 64
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC2 a_texcoord0 is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_bloom 21
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_bloom is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #1 at location 1.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_lightingColor 22
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_lightingColor is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_texcoord0: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (6243): BGFX Fragment Shader consts 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5012): BGFX Program create: GL66: GL50, GL65
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5122): BGFX Program 66
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5123): BGFX Attributes (2):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC3 a_position is at location 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5152): BGFX 	GL_FLOAT_VEC2 a_texcoord0 is at location 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5158): BGFX Uniforms (3):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5258): BGFX Sampler #0 at location 0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store s_lightingColor 22
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_SAMPLER_2D s_lightingColor is at location 0, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_MAT4 u_modelViewProj* is at location 1, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5298): BGFX store u_postProcessingParams 26
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5309): BGFX 	uniform GL_FLOAT_VEC4 u_postProcessingParams is at location 2, size 1, offset 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5327): BGFX Buffers (0):
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_position: 0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5363): BGFX attr a_texcoord0: 1
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    15: RGBA32F (requested: RGBA32F), layers 1, 149x454x0 (render target).
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    16: RGBA32F (requested: RGBA32F), layers 1, 149x454x0 (render target).
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    17: D32F (requested: D32F), layers 1, 149x454x0 (render target).
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    18: BGRA8 (requested: BGRA8), layers 1, 2048x2048x0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\bgfx.cpp (546): BGFX VertexLayout 93597fa9 (21d0cb5a), stride 20
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\bgfx.cpp (566): BGFX 	attr  0: Attrib::Position     num 2, type 4, norm [ ], asint [ ], offset  0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\bgfx.cpp (566): BGFX 	attr  4: Attrib::Color0       num 4, type 0, norm [x], asint [ ], offset 16
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\bgfx.cpp (566): BGFX 	attr 10: Attrib::TexCoord0    num 2, type 4, norm [ ], asint [ ], offset  8
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    19: RGBA32F (requested: RGBA32F), layers 1, 149x454x0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    20: RGBA32F (requested: RGBA32F), layers 1, 149x454x0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    21: D32F (requested: D32F), layers 1, 149x454x0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\bgfx.cpp (546): BGFX VertexLayout 30726566 (1dbe9673), stride 24
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\bgfx.cpp (566): BGFX 	attr  0: Attrib::Position     num 3, type 4, norm [ ], asint [ ], offset  0
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\bgfx.cpp (566): BGFX 	attr  4: Attrib::Color0       num 4, type 0, norm [x], asint [ ], offset 12
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\bgfx.cpp (566): BGFX 	attr 10: Attrib::TexCoord0    num 2, type 4, norm [ ], asint [ ], offset 16
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D     3: RGBA32F (requested: RGBA32F), layers 1, 619x438x0 (render target).
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D     2: RGBA32F (requested: RGBA32F), layers 1, 619x438x0 (render target).
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D     1: D32F (requested: D32F), layers 1, 619x438x0 (render target).
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    22: RGBA32F (requested: RGBA32F), layers 1, 619x438x0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    23: RGBA32F (requested: RGBA32F), layers 1, 619x438x0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (5761): BGFX Texture2D    24: D32F (requested: D32F), layers 1, 619x438x0.
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (7738): BGFX ASSERT glDispatchCompute(compute.m_numX, compute.m_numY, compute.m_numZ); GL error 0x502: GL_INVALID_OPERATION
F:\Works\catdogengine\Engine\Source\ThirdParty\bgfx\src\renderer_gl.cpp (7738): BGFX FATAL 0x00000000: glDispatchCompute(compute.m_numX, compute.m_numY, compute.m_numZ); GL error 0x502: GL_INVALID_OPERATION
已在 Editor.exe 中执行断点指令(__debugbreak()语句或类似调用)。

Comment on lines +21 to +57
AtmosphereParameters GetAtmosphere() {
DensityProfileLayer densityProfileLayer0 = {0.000000, 0.000000, 0.000000, 0.000000, 0.000000};
DensityProfileLayer densityProfileLayer1 = {0.000000, 1.000000, -0.125000, 0.000000, 0.000000};
DensityProfile densityProfile1;
densityProfile1.layers[0] = densityProfileLayer0;
densityProfile1.layers[1] = densityProfileLayer1;

DensityProfileLayer densityProfileLayer2 = {0.000000, 0.000000, 0.000000, 0.000000, 0.000000};
DensityProfileLayer densityProfileLayer3 = {0.000000, 1.000000, -0.833333, 0.000000, 0.00000};
DensityProfile densityProfile2;
densityProfile2.layers[0] = densityProfileLayer2;
densityProfile2.layers[1] = densityProfileLayer3;

DensityProfileLayer densityProfileLayer4 = {25.000000, 0.000000, 0.000000, 0.066667, -0.666667};
DensityProfileLayer densityProfileLayer5 = {0.000000, 0.000000, 0.000000, -0.066667, 2.666667};
DensityProfile densityProfile3;
densityProfile3.layers[0] = densityProfileLayer4;
densityProfile3.layers[1] = densityProfileLayer5;

AtmosphereParameters atmosphere = {
vec3(10.000000, 10.000000, 10.000000),
0.004675,
6360.000000,
6420.000000,
densityProfile1,
vec3(0.005802, 0.013558, 0.033100),
densityProfile2,
vec3(0.003996, 0.003996, 0.003996),
vec3(0.004440, 0.004440, 0.004440),
0.900000,
densityProfile3,
vec3(0.000650, 0.001881, 0.000085),
vec3(0.100000, 0.100000, 0.100000),
-0.207912};

return atmosphere;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it static.

@T-rvw

This comment was marked as resolved.

@@ -546,6 +546,8 @@ void EditorApp::EngineRenderersWarmup()

bool EditorApp::IsAtmosphericScatteringEnable() const
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this function if all fixed.

@@ -9,7 +9,7 @@ int main()
pEngine->Init({ .pTitle = "CatDogEditor", .pIconFilePath = "editor_icon.png",
.width = 1280, .height = 720, .useFullScreen = false,
.language = Language::ChineseSimplied,
.backend = GraphicsBackend::Direct3D11, .compileAllShaders = false });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert.

@roeas
Copy link
Contributor Author

roeas commented Nov 27, 2023

https://stackoverflow.com/questions/72514919/max-image-units-in-glsl
https://stackoverflow.com/questions/18242009/glsl-error-c3012-invalid-value-8-for-layout-specifier-binding-in-compute-shad

It does look like OpenGL's limit of the number of image uniforms is 8, but that makes it even stranger, since none of the slots in the compute shader at the time of this crash were greater than 7.

@T-rvw
Copy link
Contributor

T-rvw commented Nov 28, 2023

https://stackoverflow.com/questions/72514919/max-image-units-in-glsl https://stackoverflow.com/questions/18242009/glsl-error-c3012-invalid-value-8-for-layout-specifier-binding-in-compute-shad

It does look like OpenGL's limit of the number of image uniforms is 8, but that makes it even stranger, since none of the slots in the compute shader at the time of this crash were greater than 7.

The min number is 8. New graphics card can use 16~32.
Can you have a look at bgfx init log? It should log the int number GL_MAX_TEXTURE_IMAGE_UNITS queried from OpenGL driver.
BGFX GL_MAX_TEXTURE_IMAGE_UNITS 32 (min: 8)

@T-rvw
Copy link
Contributor

T-rvw commented Nov 28, 2023

See https://github.com/godotengine/godot/blob/f82bf35a03502b33e0b3a5987573e3c6987912ce/drivers/gles3/rasterizer_scene_gles3.cpp#L2474.
Godot queries the max texture count and decide actual texture slot by it. Not use a fixed int number. @Hinageshi01

So we can have a look at bgfx if it supports similar operations? Dynamic texture slot index rather than fixed index.

Another question is that FS uses more than actual hardware texture count. It doesn't have a good solution. Just decided by game project which is the lowest device it wants to support. Then project should enable/disable features for every device level.

@T-rvw
Copy link
Contributor

T-rvw commented Jan 23, 2024

Close it as we have enough findings about this issue. The solution is recorded in #425. Reopen it if you have new thoughts.

@T-rvw T-rvw closed this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants