[Mesa-dev] [PATCH 07/68] i965: add new field for storing program size
Timothy Arceri
timothy.arceri at collabora.com
Wed Jun 1 06:22:48 UTC 2016
From: Carl Worth <cworth at cworth.org>
This will be used by the on disk shader cache.
Signed-off-by: Timothy Arceri <timothy.arceri at collabora.com>
---
src/mesa/drivers/dri/i965/brw_compiler.h | 4 ++++
src/mesa/drivers/dri/i965/brw_vs.c | 2 ++
src/mesa/drivers/dri/i965/brw_wm.c | 2 ++
3 files changed, 8 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h
index 0844694..b8584c8 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.h
+++ b/src/mesa/drivers/dri/i965/brw_compiler.h
@@ -422,6 +422,8 @@ struct brw_wm_prog_data {
* For varying slots that are not used by the FS, the value is -1.
*/
int urb_setup[VARYING_SLOT_MAX];
+
+ GLuint program_size;
};
struct brw_cs_prog_data {
@@ -625,6 +627,8 @@ struct brw_vs_prog_data {
bool uses_basevertex;
bool uses_baseinstance;
bool uses_drawid;
+
+ GLuint program_size;
};
struct brw_tcs_prog_data
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 7156709..42fc0d6 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -220,6 +220,8 @@ brw_codegen_vs_prog(struct brw_context *brw,
&prog_data, sizeof(prog_data),
&brw->vs.base.prog_offset, &brw->vs.prog_data, vp);
+ brw->vs.prog_data->program_size = program_size;
+
ralloc_free(mem_ctx);
return true;
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 0a008f8..d1d8312 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -177,6 +177,8 @@ brw_codegen_wm_prog(struct brw_context *brw,
&prog_data, sizeof(prog_data),
&brw->wm.base.prog_offset, &brw->wm.prog_data, fp);
+ brw->wm.prog_data->program_size = program_size;
+
ralloc_free(mem_ctx);
return true;
--
2.5.5
More information about the mesa-dev
mailing list