aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-09-26 11:38:06 -0700
committerKenneth Graunke <[email protected]>2014-11-29 02:18:47 -0800
commit67c498086d0858a94d53ebb6921cfda847250368 (patch)
tree3ba05acccc42f6c68d9456677aa5dabe0cddd4f7 /src/mesa/drivers/dri/i965
parente563c33d57f779b34d885c561b731b3eb8eb25b7 (diff)
i965: Add _CACHE_ in brw_cache_id enum names.
BRW_CACHE_VS_PROG is more easily associated with program caches than plain BRW_VS_PROG. While we're at it, rename BRW_WM_PROG to BRW_CACHE_FS_PROG, to move away from the outdated Windowizer/Masker name. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h28
-rw-r--r--src/mesa/drivers/dri/i965/brw_ff_gs.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_cache.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_dump.c14
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c6
10 files changed, 43 insertions, 43 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 844f5e43029..a103af0878b 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -2119,14 +2119,14 @@ brw_blorp_blit_params::get_wm_prog(struct brw_context *brw,
brw_blorp_prog_data **prog_data) const
{
uint32_t prog_offset = 0;
- if (!brw_search_cache(&brw->cache, BRW_BLORP_BLIT_PROG,
+ if (!brw_search_cache(&brw->cache, BRW_CACHE_BLORP_BLIT_PROG,
&this->wm_prog_key, sizeof(this->wm_prog_key),
&prog_offset, prog_data)) {
brw_blorp_blit_program prog(brw, &this->wm_prog_key,
INTEL_DEBUG & DEBUG_BLORP);
GLuint program_size;
const GLuint *program = prog.compile(brw, &program_size);
- brw_upload_cache(&brw->cache, BRW_BLORP_BLIT_PROG,
+ brw_upload_cache(&brw->cache, BRW_CACHE_BLORP_BLIT_PROG,
&this->wm_prog_key, sizeof(this->wm_prog_key),
program, program_size,
&prog.prog_data, sizeof(prog.prog_data),
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index debeee5ccc9..3fef38ccab9 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -122,7 +122,7 @@ static void compile_clip_prog( struct brw_context *brw,
}
brw_upload_cache(&brw->cache,
- BRW_CLIP_PROG,
+ BRW_CACHE_CLIP_PROG,
&c.key, sizeof(c.key),
program, program_size,
&c.prog_data, sizeof(c.prog_data),
@@ -248,7 +248,7 @@ brw_upload_clip_prog(struct brw_context *brw)
}
}
- if (!brw_search_cache(&brw->cache, BRW_CLIP_PROG,
+ if (!brw_search_cache(&brw->cache, BRW_CACHE_CLIP_PROG,
&key, sizeof(key),
&brw->clip.prog_offset, &brw->clip.prog_data)) {
compile_clip_prog( brw, &key );
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index fac22dc99a9..c4e96dee327 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -693,13 +693,13 @@ struct brw_gs_prog_data
#define SHADER_TIME_STRIDE 64
enum brw_cache_id {
- BRW_WM_PROG,
- BRW_BLORP_BLIT_PROG,
- BRW_SF_PROG,
- BRW_VS_PROG,
- BRW_FF_GS_PROG,
- BRW_GS_PROG,
- BRW_CLIP_PROG,
+ BRW_CACHE_FS_PROG,
+ BRW_CACHE_BLORP_BLIT_PROG,
+ BRW_CACHE_SF_PROG,
+ BRW_CACHE_VS_PROG,
+ BRW_CACHE_FF_GS_PROG,
+ BRW_CACHE_GS_PROG,
+ BRW_CACHE_CLIP_PROG,
BRW_MAX_CACHE
};
@@ -777,13 +777,13 @@ enum shader_time_shader_type {
/* Flags for brw->state.cache.
*/
-#define CACHE_NEW_WM_PROG (1<<BRW_WM_PROG)
-#define CACHE_NEW_BLORP_BLIT_PROG (1<<BRW_BLORP_BLIT_PROG)
-#define CACHE_NEW_SF_PROG (1<<BRW_SF_PROG)
-#define CACHE_NEW_VS_PROG (1<<BRW_VS_PROG)
-#define CACHE_NEW_FF_GS_PROG (1<<BRW_FF_GS_PROG)
-#define CACHE_NEW_GS_PROG (1<<BRW_GS_PROG)
-#define CACHE_NEW_CLIP_PROG (1<<BRW_CLIP_PROG)
+#define CACHE_NEW_WM_PROG (1 << BRW_CACHE_FS_PROG)
+#define CACHE_NEW_BLORP_BLIT_PROG (1 << BRW_CACHE_BLORP_BLIT_PROG)
+#define CACHE_NEW_SF_PROG (1 << BRW_CACHE_SF_PROG)
+#define CACHE_NEW_VS_PROG (1 << BRW_CACHE_VS_PROG)
+#define CACHE_NEW_FF_GS_PROG (1 << BRW_CACHE_FF_GS_PROG)
+#define CACHE_NEW_GS_PROG (1 << BRW_CACHE_GS_PROG)
+#define CACHE_NEW_CLIP_PROG (1 << BRW_CACHE_CLIP_PROG)
struct brw_vertex_buffer {
/** Buffer object containing the uploaded vertex data */
diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.c b/src/mesa/drivers/dri/i965/brw_ff_gs.c
index 377e1faa24d..d21243836b4 100644
--- a/src/mesa/drivers/dri/i965/brw_ff_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_ff_gs.c
@@ -139,7 +139,7 @@ static void compile_ff_gs_prog(struct brw_context *brw,
fprintf(stderr, "\n");
}
- brw_upload_cache(&brw->cache, BRW_FF_GS_PROG,
+ brw_upload_cache(&brw->cache, BRW_CACHE_FF_GS_PROG,
&c.key, sizeof(c.key),
program, program_size,
&c.prog_data, sizeof(c.prog_data),
@@ -235,7 +235,7 @@ brw_upload_ff_gs_prog(struct brw_context *brw)
}
if (brw->ff_gs.prog_active) {
- if (!brw_search_cache(&brw->cache, BRW_FF_GS_PROG,
+ if (!brw_search_cache(&brw->cache, BRW_CACHE_FF_GS_PROG,
&key, sizeof(key),
&brw->ff_gs.prog_offset, &brw->ff_gs.prog_data)) {
compile_ff_gs_prog( brw, &key );
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 4b61646acfa..b2ecf8fd0c5 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -282,7 +282,7 @@ do_gs_prog(struct brw_context *brw,
brw->max_gs_threads);
}
- brw_upload_cache(&brw->cache, BRW_GS_PROG,
+ brw_upload_cache(&brw->cache, BRW_CACHE_GS_PROG,
&c.key, sizeof(c.key),
program, program_size,
&c.prog_data, sizeof(c.prog_data),
@@ -343,7 +343,7 @@ brw_upload_gs_prog(struct brw_context *brw)
/* BRW_NEW_VUE_MAP_VS */
key.input_varyings = brw->vue_map_vs.slots_valid;
- if (!brw_search_cache(&brw->cache, BRW_GS_PROG,
+ if (!brw_search_cache(&brw->cache, BRW_CACHE_GS_PROG,
&key, sizeof(key),
&stage_state->prog_offset, &brw->gs.prog_data)) {
bool success =
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 625c4a5e1de..a41a4ad4a43 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -123,7 +123,7 @@ static void compile_sf_prog( struct brw_context *brw,
fprintf(stderr, "\n");
}
- brw_upload_cache(&brw->cache, BRW_SF_PROG,
+ brw_upload_cache(&brw->cache, BRW_CACHE_SF_PROG,
&c.key, sizeof(c.key),
program, program_size,
&c.prog_data, sizeof(c.prog_data),
@@ -207,7 +207,7 @@ brw_upload_sf_prog(struct brw_context *brw)
key.frontface_ccw = (ctx->Polygon.FrontFace == GL_CCW) != render_to_fbo;
}
- if (!brw_search_cache(&brw->cache, BRW_SF_PROG,
+ if (!brw_search_cache(&brw->cache, BRW_CACHE_SF_PROG,
&key, sizeof(key),
&brw->sf.prog_offset, &brw->sf.prog_data)) {
compile_sf_prog( brw, &key );
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index cf42ada7495..29b1597168e 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -360,12 +360,12 @@ brw_init_caches(struct brw_context *brw)
if (brw->has_llc)
drm_intel_gem_bo_map_unsynchronized(cache->bo);
- cache->aux_compare[BRW_VS_PROG] = brw_vs_prog_data_compare;
- cache->aux_compare[BRW_GS_PROG] = brw_gs_prog_data_compare;
- cache->aux_compare[BRW_WM_PROG] = brw_wm_prog_data_compare;
- cache->aux_free[BRW_VS_PROG] = brw_stage_prog_data_free;
- cache->aux_free[BRW_GS_PROG] = brw_stage_prog_data_free;
- cache->aux_free[BRW_WM_PROG] = brw_stage_prog_data_free;
+ cache->aux_compare[BRW_CACHE_VS_PROG] = brw_vs_prog_data_compare;
+ cache->aux_compare[BRW_CACHE_GS_PROG] = brw_gs_prog_data_compare;
+ cache->aux_compare[BRW_CACHE_FS_PROG] = brw_wm_prog_data_compare;
+ cache->aux_free[BRW_CACHE_VS_PROG] = brw_stage_prog_data_free;
+ cache->aux_free[BRW_CACHE_GS_PROG] = brw_stage_prog_data_free;
+ cache->aux_free[BRW_CACHE_FS_PROG] = brw_stage_prog_data_free;
}
static void
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index 611998f1296..8b32810afe9 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -472,23 +472,23 @@ dump_prog_cache(struct brw_context *brw)
const char *name;
switch (item->cache_id) {
- case BRW_VS_PROG:
+ case BRW_CACHE_VS_PROG:
name = "VS kernel";
break;
- case BRW_FF_GS_PROG:
+ case BRW_CACHE_FF_GS_PROG:
name = "Fixed-function GS kernel";
break;
- case BRW_GS_PROG:
+ case BRW_CACHE_GS_PROG:
name = "GS kernel";
break;
- case BRW_CLIP_PROG:
+ case BRW_CACHE_CLIP_PROG:
name = "CLIP kernel";
break;
- case BRW_SF_PROG:
+ case BRW_CACHE_SF_PROG:
name = "SF kernel";
break;
- case BRW_WM_PROG:
- name = "WM kernel";
+ case BRW_CACHE_FS_PROG:
+ name = "FS kernel";
break;
default:
name = "unknown";
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 1bfea3d88e6..7a3b4d26384 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -312,7 +312,7 @@ do_vs_prog(struct brw_context *brw,
brw->max_vs_threads);
}
- brw_upload_cache(&brw->cache, BRW_VS_PROG,
+ brw_upload_cache(&brw->cache, BRW_CACHE_VS_PROG,
&c.key, sizeof(c.key),
program, program_size,
&prog_data, sizeof(prog_data),
@@ -345,7 +345,7 @@ brw_vs_debug_recompile(struct brw_context *brw,
for (unsigned int i = 0; i < brw->cache.size; i++) {
for (c = brw->cache.items[i]; c; c = c->next) {
- if (c->cache_id == BRW_VS_PROG) {
+ if (c->cache_id == BRW_CACHE_VS_PROG) {
old_key = c->key;
if (old_key->base.program_string_id == key->base.program_string_id)
@@ -483,7 +483,7 @@ static void brw_upload_vs_prog(struct brw_context *brw)
}
}
- if (!brw_search_cache(&brw->cache, BRW_VS_PROG,
+ if (!brw_search_cache(&brw->cache, BRW_CACHE_VS_PROG,
&key, sizeof(key),
&brw->vs.base.prog_offset, &brw->vs.prog_data)) {
bool success =
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 29d35ccf929..01838522799 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -199,7 +199,7 @@ bool do_wm_prog(struct brw_context *brw,
if (unlikely(INTEL_DEBUG & DEBUG_WM))
fprintf(stderr, "\n");
- brw_upload_cache(&brw->cache, BRW_WM_PROG,
+ brw_upload_cache(&brw->cache, BRW_CACHE_FS_PROG,
key, sizeof(struct brw_wm_prog_key),
program, program_size,
&prog_data, sizeof(prog_data),
@@ -257,7 +257,7 @@ brw_wm_debug_recompile(struct brw_context *brw,
for (unsigned int i = 0; i < brw->cache.size; i++) {
for (c = brw->cache.items[i]; c; c = c->next) {
- if (c->cache_id == BRW_WM_PROG) {
+ if (c->cache_id == BRW_CACHE_FS_PROG) {
old_key = c->key;
if (old_key->program_string_id == key->program_string_id)
@@ -573,7 +573,7 @@ brw_upload_wm_prog(struct brw_context *brw)
brw_wm_populate_key(brw, &key);
- if (!brw_search_cache(&brw->cache, BRW_WM_PROG,
+ if (!brw_search_cache(&brw->cache, BRW_CACHE_FS_PROG,
&key, sizeof(key),
&brw->wm.base.prog_offset, &brw->wm.prog_data)) {
bool success = do_wm_prog(brw, ctx->_Shader->_CurrentFragmentProgram, fp,