shaders: improve GLSL diagnostics and source attribution - #22
Conversation
2de6681 to
1f27e2c
Compare
1f27e2c to
130303e
Compare
130303e to
b5eebe2
Compare
b5eebe2 to
bd689d5
Compare
d4d9d02 to
0523569
Compare
0523569 to
e1be85f
Compare
e1be85f to
2a7c09c
Compare
2a7c09c to
05e987e
Compare
ede4b7a to
28d71e6
Compare
28d71e6 to
18c0808
Compare
18c0808 to
302cf92
Compare
cfc1617 to
2a5bdd9
Compare
da547f1 to
9242f9e
Compare
603f57c to
f83d763
Compare
f83d763 to
27c6ee0
Compare
27c6ee0 to
5fd4a80
Compare
5fd4a80 to
8441be3
Compare
8441be3 to
ea463d7
Compare
ea463d7 to
0971d10
Compare
| ${PROJECT_SOURCE_DIR}/src | ||
| ${PROJECT_SOURCE_DIR}/include | ||
| ${PROJECT_BINARY_DIR}/include | ||
| ${COIN_TARGET_INCLUDE_DIRECTORIES}) |
There was a problem hiding this comment.
Fixed by using the shared coin_add_gl_test() helper.
| static SbString | ||
| soshaderobject_inline_source_preview(const SbString & source) | ||
| { | ||
| const char * cursor = source.getString(); |
There was a problem hiding this comment.
working with std::string/std::string_view could be cleaner
There was a problem hiding this comment.
Coin is limited just to C++11 for now, I'd rather not bump it for now just for std::string_view here.
| result += sourceDescription; | ||
| if (result.getLength() > 256) { | ||
| result = result.getSubString(0, 252); | ||
| result += "..."; |
There was a problem hiding this comment.
will result be null-terminated here? 252+3=255 so \0 will be on position 256?
There was a problem hiding this comment.
SbString::getSubString() creates an owned, null-terminated string, and appending "..." preserves that termination. I replaced the unexplained indices with named length calculations so it is clear the final description is exactly capped at 256 characters, excluding the terminator.
eec0967 to
5a82619
Compare
|
All should be addressed now. |
Summary
Improve GLSL failure reporting without changing shader execution semantics.
This layer is diagnostic only; profile-neutral GLSL dispatch and shared core GL test support remain owned by PR #65.
Stack
Layer 4/18, based on PR #65.