View Issue Details

IDProjectCategoryView StatusLast Update
0002624Spring engineGeneralpublic2011-08-31 17:12
Reporterabma Assigned ToKloot  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.82.7+git 
Fixed in Version0.82.7+git 
Summary0002624: (master) shader compilation error with bumpmapped water
Description[f=0002870] Warning: FBO-BUMPWATER(reflection): has mismatched texture/buffer dimensions!
[f=0002870] Warning: FBO-BUMPWATER(refraction): has mismatched texture/buffer dimensions!
[f=0002870] [BumpWater] Error: water-shader compilation error: Vertex shader(s) linked, fragment shader(s) linked.
Validation failed! - Different sampler types for same sample texture unit in fragment shader.
[f=0002870] Statistics for RectangleOptimizer: 0%
[f=0002870] Error: Loading Bumpmapped Water failed, error: [BumpWater] water-shader compilation error!

TagsNo tags attached.
Attached Files
infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Relationships

has duplicate 0002369 resolvedabma (master) bumpmapped water error 

Activities

jK

2011-08-25 19:12

developer   ~0007291

caused by invalid validation check before texture uniforms are set

Kloot

2011-08-25 23:21

developer   ~0007294

Last edited: 2011-08-25 23:22

0) why is this assigned to me?

1) the last commit that functionally changed the validation check itself was by zerver: https://github.com/spring/spring/commit/7d2b7d06f8a386f7a557e4b6ec8c540aa32d2c3f

2) the reflect/refract FBO errors correspond to GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT, which makes no sense because sizeof(reflectTexture) == reflTexSize * reflTexSize (matches sizeof(reflectFBO)) and sizeof(refractTexture) == screenTextureX * screenTextureY (matches sizeof(refractFBO)) ==> ATI driver bug nr. 1

3) because both FBO's are invalid neither "#define opt_reflection" nor "#define opt_refraction" gets added to the definitions string, so the reflection/refraction textures are never even sampled in the shader ==> they should be culled by the GLSL compiler and their uniform locations should just be -1

4) if they weren't culled, the sampler types for these textures would also match and the shader code should validate ==> ATI driver bug nr. 2

    sampler2D reflection ==> texture2D(reflection, ...)
    sampler2DRect refraction ==> texture2DRect(refraction, ...)

jK

2011-08-25 23:36

developer   ~0007295

Last edited: 2011-08-25 23:44

the error is this:
"Validation failed! - Different sampler types for same sample texture unit in fragment shader."
And it happens cause (as said) the validation of the shader program happens before the textureids are linked (all sampler uniforms point to 0).

This happens since you switched BumpWater to your shader implementation, that's why I assigned it to you.

Yeah, ATI is _very_ strict at such stuff ...
And yeah, FBO fails because by default BumpWater uses 24bit depthbuffers, but ati doesn't support those. And the user here obviously has atihacks disabled, that fixes/workarounds all problems in this mantis btw.

jK

2011-08-26 00:08

developer   ~0007296

k FBO errors fixed the clean way:
https://github.com/spring/spring/commit/3342e25db78374aef3960923fe16ed6ecfd319cc

Kloot

2011-08-26 00:09

developer   ~0007297

mkay, that means validation needs to be done in a separate step after linking (never was "ATI hack" a more appriopriate name)

jK

2011-08-26 00:31

developer   ~0007298

you just can't buffer the validation, instead you need to validate each step.

abma

2011-08-26 01:09

administrator   ~0007300

0.82.3-3330-g3342e25:

AtiHacks = 0:
[f=0000914] Debug: /water 4
[f=0000918] Warning: FBO-BUMPWATER(reflection): has mismatched texture/buffer dimensions!
[f=0000918] Warning: FBO-BUMPWATER(refraction): has mismatched texture/buffer dimensions!
[f=0000918] [BumpWater] Error: water-shader compilation error: Vertex shader(s) linked, fragment shader(s) linked. Validation failed! - Different sampler types for same sample texture unit in fragment shader.
[f=0000918] Statistics for RectangleOptimizer: 0%
[f=0000918] Error: Loading Bumpmapped Water failed, error: [BumpWater] water-shader compilation error!
[f=0000918] Set water rendering mode to 4 (basic)
[f=0001102] User exited
[f=0001102] Debug: /quit

AtiHacks = 1:
[f=0000155] Debug: /water 4
[f=0000157] Warning: FBO-BUMPWATER(reflection): has mismatched texture/buffer dimensions!
[f=0000157] Warning: FBO-BUMPWATER(refraction): has mismatched texture/buffer dimensions!
[f=0000157] Set water rendering mode to 4 (bumpmapped)
[f=0000319] User exited
[f=0000319] Debug: /quit

abma

2011-08-26 01:37

administrator   ~0007301

0.82.3-3330-g2c40bc3

atihacks = 0:
[f=0000105] Debug: /water 4
[f=0000108] Warning: FBO-BUMPWATER(reflection): has mismatched texture/buffer dimensions!
[f=0000108] Warning: FBO-BUMPWATER(refraction): has mismatched texture/buffer dimensions!
[f=0000108] [BumpWater] Error: water-shader compilation error: Vertex shader(s) linked, fragment shader(s) linked.
Validation failed! - Different sampler types for same sample texture unit in fragment shader.
[f=0000108] Statistics for RectangleOptimizer: 0%
[f=0000108] Error: Loading Bumpmapped Water failed, error: [BumpWater] water-shader compilation error!
[f=0000108] Set water rendering mode to 4 (basic)


atihacks = 1:
[f=0000204] Debug: /water 4
[f=0000206] Statistics for RectangleOptimizer: 0%
[f=0000206] Warning: FBO-BUMPWATER(reflection): has mismatched texture/buffer dimensions!
[f=0000206] Warning: FBO-BUMPWATER(refraction): has mismatched texture/buffer dimensions!
[f=0000206] Set water rendering mode to 4 (bumpmapped)

abma

2011-08-29 15:43

administrator   ~0007308

0.82.3-3344-g929d95b:

AtiHacks = 1:

[f=0001808] Debug: /water 3
[f=0001809] Statistics for RectangleOptimizer: 0%
[f=0001809] Error: [myGL::CheckParseErrors] Shader compilation error at index -1 (near "") when loading fragment-program file ARB/waterRefractTR.fp:
[f=0001809] Set water rendering mode to 3 (reflective&refractive)

[f=0002543] Debug: /water 4
[f=0002545] Warning: FBO-BUMPWATER(reflection): has mismatched texture/buffer dimensions!
[f=0002545] Warning: FBO-BUMPWATER(refraction): has mismatched texture/buffer dimensions!
[f=0002545] Set water rendering mode to 4 (bumpmapped)

AtiHacks = 0:
[f=0000588] Debug: /water 3
[f=0000591] Statistics for RectangleOptimizer: 0%
[f=0000591] Error: [myGL::CheckParseErrors] Shader compilation error at index -1 (near "") when loading fragment-program file ARB/waterRefractTR.fp:
[f=0000591] Set water rendering mode to 3 (reflective&refractive)


[f=0000941] Debug: /water 4
[f=0000943] Warning: FBO-BUMPWATER(reflection): has mismatched texture/buffer dimensions!
[f=0000943] Warning: FBO-BUMPWATER(refraction): has mismatched texture/buffer dimensions!
[f=0000943] Set water rendering mode to 4 (bumpmapped)

Issue History

Date Modified Username Field Change
2011-08-25 01:12 abma New Issue
2011-08-25 01:12 abma File Added: infolog.txt
2011-08-25 03:00 abma Relationship added has duplicate 0002369
2011-08-25 19:11 jK Status new => assigned
2011-08-25 19:11 jK Assigned To => Kloot
2011-08-25 19:12 jK Note Added: 0007291
2011-08-25 23:21 Kloot Note Added: 0007294
2011-08-25 23:21 Kloot Note Edited: 0007294
2011-08-25 23:22 Kloot Note Edited: 0007294
2011-08-25 23:22 Kloot Note Edited: 0007294
2011-08-25 23:36 jK Note Added: 0007295
2011-08-25 23:37 jK Note Edited: 0007295
2011-08-25 23:42 jK Note Edited: 0007295
2011-08-25 23:44 jK Note Edited: 0007295
2011-08-25 23:44 jK Note Edited: 0007295
2011-08-26 00:08 jK Note Added: 0007296
2011-08-26 00:09 Kloot Note Added: 0007297
2011-08-26 00:31 jK Note Added: 0007298
2011-08-26 01:09 abma Note Added: 0007300
2011-08-26 01:37 abma Note Added: 0007301
2011-08-29 15:43 abma Note Added: 0007308
2011-08-31 17:12 Kloot Status assigned => resolved
2011-08-31 17:12 Kloot Fixed in Version => 0.82.7+git
2011-08-31 17:12 Kloot Resolution open => fixed