summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderimage.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-16 00:44:43 +0100
committerMarek Olšák <[email protected]>2018-02-13 01:00:45 +0100
commit78f1decc95edee0c774098e29582d5bb9dec39a4 (patch)
tree15577849bb1fcac6a68a253fc197b0707d5d5738 /src/mesa/main/shaderimage.c
parentca5c5d96d8d6c4aa39701ec2bd012b79d9493910 (diff)
mesa: reduce the size of gl_image_unit (v2)
gl_context::ImageUnits: 6144 -> 4608 bytes v2: use ASSERT_BITFIELD_SIZE Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderimage.c')
-rw-r--r--src/mesa/main/shaderimage.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index c722b327de2..596eadd4f85 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -464,6 +464,8 @@ _mesa_init_image_units(struct gl_context *ctx)
{
unsigned i;
+ ASSERT_BITFIELD_SIZE(struct gl_image_unit, Format, MESA_FORMAT_COUNT);
+
for (i = 0; i < ARRAY_SIZE(ctx->ImageUnits); ++i)
ctx->ImageUnits[i] = _mesa_default_image_unit(ctx);
}