aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-29 18:06:49 -0700
committerJason Ekstrand <[email protected]>2015-09-30 08:35:32 -0700
commit3948ac19a40663bd00deb84518ac747daa5f401f (patch)
treef96bfbe002dc9052ed97d6ebef703f38572cbf5e /src/mesa/drivers
parentbfdc76c133bb9e91049824b7480f862f142e4195 (diff)
i965: Get rid of prog_data compare functions
They are no longer used. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h27
-rw-r--r--src/mesa/drivers/dri/i965/brw_cs.c21
-rw-r--r--src/mesa/drivers/dri/i965/brw_cs.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c21
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c17
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.h4
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c21
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c19
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h1
11 files changed, 1 insertions, 135 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 3bae90dafaf..1dd48f6d9b7 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -340,9 +340,6 @@ struct brw_shader {
bool compiled_once;
};
-/* Note: If adding fields that need anything besides a normal memcmp() for
- * comparing them, be sure to go fix brw_stage_prog_data_compare().
- */
struct brw_stage_prog_data {
struct {
/** size of our binding table. */
@@ -378,18 +375,11 @@ struct brw_stage_prog_data {
/* Pointers to tracked values (only valid once
* _mesa_load_state_parameters has been called at runtime).
- *
- * These must be the last fields of the struct (see
- * brw_stage_prog_data_compare()).
*/
const gl_constant_value **param;
const gl_constant_value **pull_param;
- /**
- * Image metadata passed to the shader as uniforms. This is deliberately
- * ignored by brw_stage_prog_data_compare() because its contents don't have
- * any influence on program compilation.
- */
+ /** Image metadata passed to the shader as uniforms. */
struct brw_image_param *image_param;
};
@@ -443,9 +433,6 @@ struct brw_image_param {
* there can be many of these, each in a different GL state
* corresponding to a different brw_wm_prog_key struct, with different
* compiled programs.
- *
- * Note: brw_wm_prog_data_compare() must be updated when adding fields to this
- * struct!
*/
struct brw_wm_prog_data {
struct brw_stage_prog_data base;
@@ -489,9 +476,6 @@ struct brw_wm_prog_data {
int urb_setup[VARYING_SLOT_MAX];
};
-/* Note: brw_cs_prog_data_compare() must be updated when adding fields to this
- * struct!
- */
struct brw_cs_prog_data {
struct brw_stage_prog_data base;
@@ -692,9 +676,6 @@ enum shader_dispatch_mode {
DISPATCH_MODE_SIMD8 = 3,
};
-/* Note: brw_vue_prog_data_compare() must be updated when adding fields to
- * this struct!
- */
struct brw_vue_prog_data {
struct brw_stage_prog_data base;
struct brw_vue_map vue_map;
@@ -712,9 +693,6 @@ struct brw_vue_prog_data {
};
-/* Note: brw_vs_prog_data_compare() must be updated when adding fields to this
- * struct!
- */
struct brw_vs_prog_data {
struct brw_vue_prog_data base;
@@ -774,9 +752,6 @@ struct brw_vs_prog_data {
#define SURF_INDEX_GEN6_SOL_BINDING(t) (t)
-/* Note: brw_gs_prog_data_compare() must be updated when adding fields to
- * this struct!
- */
struct brw_gs_prog_data
{
struct brw_vue_prog_data base;
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index cb3fae66ec3..02eeeda8377 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -31,27 +31,6 @@
#include "brw_state.h"
#include "intel_batchbuffer.h"
-bool
-brw_cs_prog_data_compare(const void *in_a, const void *in_b)
-{
- const struct brw_cs_prog_data *a =
- (const struct brw_cs_prog_data *)in_a;
- const struct brw_cs_prog_data *b =
- (const struct brw_cs_prog_data *)in_b;
-
- /* Compare the base structure. */
- if (!brw_stage_prog_data_compare(&a->base, &b->base))
- return false;
-
- /* Compare the rest of the structure. */
- const unsigned offset = sizeof(struct brw_stage_prog_data);
- if (memcmp(((char *) a) + offset, ((char *) b) + offset,
- sizeof(struct brw_cs_prog_data) - offset))
- return false;
-
- return true;
-}
-
static bool
brw_codegen_cs_prog(struct brw_context *brw,
struct gl_shader_program *prog,
diff --git a/src/mesa/drivers/dri/i965/brw_cs.h b/src/mesa/drivers/dri/i965/brw_cs.h
index 746fb05166c..0018c043415 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.h
+++ b/src/mesa/drivers/dri/i965/brw_cs.h
@@ -36,8 +36,6 @@ struct brw_cs_prog_key {
extern "C" {
#endif
-bool brw_cs_prog_data_compare(const void *a, const void *b);
-
void
brw_upload_cs_prog(struct brw_context *brw);
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 0de36cc9af1..61e7b2a77f0 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -394,24 +394,3 @@ brw_gs_precompile(struct gl_context *ctx,
return success;
}
-
-
-bool
-brw_gs_prog_data_compare(const void *in_a, const void *in_b)
-{
- const struct brw_gs_prog_data *a = in_a;
- const struct brw_gs_prog_data *b = in_b;
-
- /* Compare the base structure. */
- if (!brw_stage_prog_data_compare(&a->base.base, &b->base.base))
- return false;
-
- /* Compare the rest of the struct. */
- const unsigned offset = sizeof(struct brw_stage_prog_data);
- if (memcmp(((char *) a) + offset, ((char *) b) + offset,
- sizeof(struct brw_gs_prog_data) - offset)) {
- return false;
- }
-
- return true;
-}
diff --git a/src/mesa/drivers/dri/i965/brw_gs.h b/src/mesa/drivers/dri/i965/brw_gs.h
index b327c40f140..9879f3d6464 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.h
+++ b/src/mesa/drivers/dri/i965/brw_gs.h
@@ -37,8 +37,6 @@ struct gl_context;
struct gl_shader_program;
struct gl_program;
-bool brw_gs_prog_data_compare(const void *a, const void *b);
-
void
brw_upload_gs_prog(struct brw_context *brw);
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 1ac0ed273ef..fee96a8c9b0 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -544,23 +544,6 @@ brw_mark_surface_used(struct brw_stage_prog_data *prog_data,
MAX2(prog_data->binding_table.size_bytes, (surf_index + 1) * 4);
}
-bool
-brw_stage_prog_data_compare(const struct brw_stage_prog_data *a,
- const struct brw_stage_prog_data *b)
-{
- /* Compare all the struct up to the pointers. */
- if (memcmp(a, b, offsetof(struct brw_stage_prog_data, param)))
- return false;
-
- if (memcmp(a->param, b->param, a->nr_params * sizeof(void *)))
- return false;
-
- if (memcmp(a->pull_param, b->pull_param, a->nr_pull_params * sizeof(void *)))
- return false;
-
- return true;
-}
-
void
brw_stage_prog_data_free(const void *p)
{
diff --git a/src/mesa/drivers/dri/i965/brw_program.h b/src/mesa/drivers/dri/i965/brw_program.h
index 72d68d869fc..cf0522a8b10 100644
--- a/src/mesa/drivers/dri/i965/brw_program.h
+++ b/src/mesa/drivers/dri/i965/brw_program.h
@@ -169,10 +169,6 @@ void
brw_mark_surface_used(struct brw_stage_prog_data *prog_data,
unsigned surf_index);
-bool
-brw_stage_prog_data_compare(const struct brw_stage_prog_data *a,
- const struct brw_stage_prog_data *b);
-
void
brw_stage_prog_data_free(const void *prog_data);
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 0c60bde511e..0a348a56127 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -65,27 +65,6 @@ gl_clip_plane *brw_select_clip_planes(struct gl_context *ctx)
}
}
-
-bool
-brw_vs_prog_data_compare(const void *in_a, const void *in_b)
-{
- const struct brw_vs_prog_data *a = in_a;
- const struct brw_vs_prog_data *b = in_b;
-
- /* Compare the base structure. */
- if (!brw_stage_prog_data_compare(&a->base.base, &b->base.base))
- return false;
-
- /* Compare the rest of the struct. */
- const unsigned offset = sizeof(struct brw_stage_prog_data);
- if (memcmp(((char *) a) + offset, ((char *) b) + offset,
- sizeof(struct brw_vs_prog_data) - offset)) {
- return false;
- }
-
- return true;
-}
-
bool
brw_codegen_vs_prog(struct brw_context *brw,
struct gl_shader_program *prog,
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h
index 3a847fcd28a..08483f048db 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -64,7 +64,6 @@ const unsigned *brw_vs_emit(struct brw_context *brw,
void brw_vs_debug_recompile(struct brw_context *brw,
struct gl_shader_program *prog,
const struct brw_vs_prog_key *key);
-bool brw_vs_prog_data_compare(const void *a, const void *b);
void
brw_upload_vs_prog(struct brw_context *brw);
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 35c0908324f..cc97d6a72fe 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -131,25 +131,6 @@ computed_depth_mode(struct gl_fragment_program *fp)
return BRW_PSCDEPTH_OFF;
}
-bool
-brw_wm_prog_data_compare(const void *in_a, const void *in_b)
-{
- const struct brw_wm_prog_data *a = in_a;
- const struct brw_wm_prog_data *b = in_b;
-
- /* Compare the base structure. */
- if (!brw_stage_prog_data_compare(&a->base, &b->base))
- return false;
-
- /* Compare the rest of the structure. */
- const unsigned offset = sizeof(struct brw_stage_prog_data);
- if (memcmp(((char *) a) + offset, ((char *) b) + offset,
- sizeof(struct brw_wm_prog_data) - offset))
- return false;
-
- return true;
-}
-
/**
* All Mesa program -> GPU code generation goes through this function.
* Depending on the instructions used (i.e. flow control instructions)
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 0a8a97b2f5e..77b83b0a3f8 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -85,7 +85,6 @@ bool brw_codegen_wm_prog(struct brw_context *brw,
void brw_wm_debug_recompile(struct brw_context *brw,
struct gl_shader_program *prog,
const struct brw_wm_prog_key *key);
-bool brw_wm_prog_data_compare(const void *a, const void *b);
void
brw_upload_wm_prog(struct brw_context *brw);