summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2015-08-17 02:01:40 +0300
committerFrancisco Jerez <[email protected]>2015-08-20 12:26:53 +0300
commitd70edfcfd53b50da0c4bb7aad909302dca6d4722 (patch)
treeeda825b4badb8d947ca31562240a14428a222f58 /src/mesa
parent3b70f7900ba14e83081d8ebcd1b827ba605a8e8b (diff)
mesa: Initialize image unit state to different defaults in GLES.
There is no GL_R8 image format in GLES, according to the state table 20.32 of the GLES 3.1 spec the default value should be GL_R32UI. The ES31-CTS.shader_image_load_store.basic-api-bind Khronos conformance test checks that this is the case. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/shaderimage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index 48e3e09dd5d..5a3c47a62c8 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -397,10 +397,11 @@ is_image_format_supported(const struct gl_context *ctx, GLenum format)
struct gl_image_unit
_mesa_default_image_unit(struct gl_context *ctx)
{
+ const GLenum format = _mesa_is_desktop_gl(ctx) ? GL_R8 : GL_R32UI;
const struct gl_image_unit u = {
.Access = GL_READ_ONLY,
- .Format = GL_R8,
- ._ActualFormat = _mesa_get_shader_image_format(GL_R8)
+ .Format = format,
+ ._ActualFormat = _mesa_get_shader_image_format(format)
};
return u;
}