Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
struct brw_cache_item *next;
};
+enum brw_cache_id
+brw_stage_cache_id(gl_shader_stage stage)
+{
+ static const enum brw_cache_id stage_ids[] = {
+ BRW_CACHE_VS_PROG,
+ BRW_CACHE_TCS_PROG,
+ BRW_CACHE_TES_PROG,
+ BRW_CACHE_GS_PROG,
+ BRW_CACHE_FS_PROG,
+ BRW_CACHE_CS_PROG,
+ };
+ assert((int)stage >= 0 && stage < ARRAY_SIZE(stage_ids));
+ return stage_ids[stage];
+}
+
static unsigned
get_program_string_id(enum brw_cache_id cache_id, const void *key)
{
void brw_print_program_cache(struct brw_context *brw);
+enum brw_cache_id brw_stage_cache_id(gl_shader_stage stage);
+
/* intel_batchbuffer.c */
void brw_require_statebuffer_space(struct brw_context *brw, int size);
void *brw_state_batch(struct brw_context *brw,