#include "shared.h"
#include "shaderobj.h"
#include "shaderimage.h"
+#include "util/disk_cache.h"
#include "util/strtod.h"
#include "stencil.h"
#include "texcompress_s3tc.h"
memset(&ctx->TextureFormatSupported, GL_TRUE,
sizeof(ctx->TextureFormatSupported));
+ ctx->Cache = disk_cache_create();
+
switch (ctx->API) {
case API_OPENGL_COMPAT:
ctx->BeginEnd = create_beginend_table(ctx);
free(ctx->BeginEnd);
free(ctx->OutsideBeginEnd);
free(ctx->Save);
+ ralloc_free(ctx->Cache);
return GL_FALSE;
}
free(ctx->Save);
free(ctx->ContextLost);
+ ralloc_free(ctx->Cache);
+
/* Shared context state (display lists, textures, etc) */
_mesa_reference_shared_state(ctx, &ctx->Shared, NULL);
bool is_arb_asm; /** Is this an ARB assembly-style program */
+ /** Is this program written to on disk shader cache */
+ bool program_written_to_cache;
+
GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
GLbitfield TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */
GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */
GLuint Name; /**< AKA the handle */
GLint RefCount; /**< Reference count */
GLchar *Label; /**< GL_KHR_debug */
+ unsigned char sha1[20]; /**< SHA1 hash of pre-processed source */
GLboolean DeletePending;
GLboolean CompileStatus;
bool IsES; /**< True if this shader uses GLSL ES */
{
GLint RefCount; /**< Reference count */
+ /** SHA1 hash of linked shader program */
+ unsigned char sha1[20];
+
unsigned NumUniformStorage;
unsigned NumHiddenUniforms;
struct gl_uniform_storage *UniformStorage;
* Stores the arguments to glPrimitiveBoundingBox
*/
GLfloat PrimitiveBoundingBox[8];
+
+ struct disk_cache *Cache;
};
/**