They are no longer used.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
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. */
/* 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;
};
* 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;
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;
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;
};
-/* 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;
#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;
#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,
extern "C" {
#endif
-bool brw_cs_prog_data_compare(const void *a, const void *b);
-
void
brw_upload_cs_prog(struct brw_context *brw);
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;
-}
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);
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)
{
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);
}
}
-
-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,
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);
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)
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);