mesa: reduce the size of gl_program
gl_program: 1456 -> 976 bytes Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
78f1decc95
commit
65ed98839b
|
@ -1423,11 +1423,10 @@ link_assign_uniform_storage(struct gl_context *ctx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_ASSERT(sizeof(shader->Program->sh.SamplerTargets) ==
|
STATIC_ASSERT(ARRAY_SIZE(shader->Program->sh.SamplerTargets) ==
|
||||||
sizeof(parcel.targets));
|
ARRAY_SIZE(parcel.targets));
|
||||||
memcpy(shader->Program->sh.SamplerTargets,
|
for (unsigned j = 0; j < ARRAY_SIZE(parcel.targets); j++)
|
||||||
parcel.targets,
|
shader->Program->sh.SamplerTargets[j] = parcel.targets[j];
|
||||||
sizeof(shader->Program->sh.SamplerTargets));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
|
@ -2168,7 +2168,7 @@ struct gl_program
|
||||||
/** Subset of OutputsWritten outputs written with non-zero index. */
|
/** Subset of OutputsWritten outputs written with non-zero index. */
|
||||||
GLbitfield64 SecondaryOutputsWritten;
|
GLbitfield64 SecondaryOutputsWritten;
|
||||||
/** TEXTURE_x_BIT bitmask */
|
/** TEXTURE_x_BIT bitmask */
|
||||||
GLbitfield TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS];
|
GLbitfield16 TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS];
|
||||||
/** Bitfield of which samplers are used */
|
/** Bitfield of which samplers are used */
|
||||||
GLbitfield SamplersUsed;
|
GLbitfield SamplersUsed;
|
||||||
/** Texture units used for shadow sampling. */
|
/** Texture units used for shadow sampling. */
|
||||||
|
@ -2246,7 +2246,7 @@ struct gl_program
|
||||||
/** Which texture target is being sampled
|
/** Which texture target is being sampled
|
||||||
* (TEXTURE_1D/2D/3D/etc_INDEX)
|
* (TEXTURE_1D/2D/3D/etc_INDEX)
|
||||||
*/
|
*/
|
||||||
gl_texture_index SamplerTargets[MAX_SAMPLERS];
|
GLubyte SamplerTargets[MAX_SAMPLERS];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of samplers declared with the bindless_sampler layout
|
* Number of samplers declared with the bindless_sampler layout
|
||||||
|
|
Loading…
Reference in New Issue