"Writes to such regions are ignored. The GL may attempt to write to uncommitted regions but the effect of doing so will be benign."
Evidently the definition of "benign" is up for debate unless you are discussing imageLoad (...)
. Attempting to store something will not produce random garbage, but reading is very clearly undefined:
"Reads from such regions produce undefined data, but otherwise have no adverse effect."
I would like to take this opportunity to point out, however, that GL_ARB_sparse_texture
is functionally incomplete. Many of these things that are undefined in that extension are properly handled given a pair of supplemental extensions.
Think of this like Direct3D 11.2's tiled resources - there are multiple tiers of support depending on hardware capabilities. The ARB extension you are working with here is the minimally functional tier and the more advanced tier is implemented through the following two extensions:
GL_ARB_sparse_texture2
GL_ARB_sparse_texture_clamp
The scenarios you are discussing have well-defined behavior if you read up on Extension #1.
Overview
This extension builds on the ARB_sparse_texture extension, providing the
following new functionality:
New built-in GLSL texture lookup and image load functions are provided
that return information on whether the texels accessed for the texture
lookup accessed uncommitted texture memory.
New built-in GLSL texture lookup functions are provided that specify a
minimum level of detail to use for lookups where the level of detail
is computed automatically. This allows shaders to avoid accessing
unpopulated portions of high-resolution levels of detail when it knows
that the memory accessed is unpopulated, either from a priori
knowledge or from feedback provided by the return value of previously
executed "sparse" texture lookup functions.
Reads of uncommitted texture memory will act as though such memory
were filled with zeroes; previously, the values returned by reads were
undefined.
Extension #2 is probably of no interest to you since you are dealing with compute shaders.