[Mesa-dev] [PATCH 07/87] i965: add new field for storing program size
Timothy Arceri
timothy.arceri at collabora.com
Wed Jul 13 02:47:02 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 10e9f47..73294d1 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.h
+++ b/src/mesa/drivers/dri/i965/brw_compiler.h
@@ -424,6 +424,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_push_const_block {
@@ -640,6 +642,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 e7a9cbc..e203083 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -230,6 +230,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 21dc204..539926d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -176,6 +176,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.7.4
More information about the mesa-dev
mailing list