i965: Get rid of prog_data compare functions
They are no longer used. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user