summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_vec4_tcs.cpp
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2016-04-14 10:59:16 +1000
committerJordan Justen <[email protected]>2017-10-31 23:36:54 -0700
commit540636045fc4893d19f68f04157ce246a2ccbebe (patch)
tree5c4f459022e2d24bd2f98dfcb2125c5d3dde44d7 /src/intel/compiler/brw_vec4_tcs.cpp
parent1edf0fe612d595bf1eee711b60db17eb25759f82 (diff)
intel/compiler: add new field for storing program size
This will be used by the on disk shader cache. v2: * Set in brw_compile_* rather than brw_codegen_*. (Jason) Signed-off-by: Timothy Arceri <[email protected]> [[email protected]: Only add to brw_stage_prog_data] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_vec4_tcs.cpp')
-rw-r--r--src/intel/compiler/brw_vec4_tcs.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/intel/compiler/brw_vec4_tcs.cpp b/src/intel/compiler/brw_vec4_tcs.cpp
index c4d9f89a91b..04feb6bdf17 100644
--- a/src/intel/compiler/brw_vec4_tcs.cpp
+++ b/src/intel/compiler/brw_vec4_tcs.cpp
@@ -388,6 +388,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
const struct gen_device_info *devinfo = compiler->devinfo;
struct brw_vue_prog_data *vue_prog_data = &prog_data->base;
const bool is_scalar = compiler->scalar_stage[MESA_SHADER_TESS_CTRL];
+ const unsigned *assembly;
nir_shader *nir = nir_shader_clone(mem_ctx, src_shader);
nir->info.outputs_written = key->outputs_written;
@@ -487,7 +488,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
g.generate_code(v.cfg, 8);
- return g.get_assembly(final_assembly_size);
+ assembly = g.get_assembly(final_assembly_size);
} else {
vec4_tcs_visitor v(compiler, log_data, key, prog_data,
nir, mem_ctx, shader_time_index, &input_vue_map);
@@ -501,10 +502,13 @@ brw_compile_tcs(const struct brw_compiler *compiler,
v.dump_instructions();
- return brw_vec4_generate_assembly(compiler, log_data, mem_ctx, nir,
- &prog_data->base, v.cfg,
- final_assembly_size);
+ assembly = brw_vec4_generate_assembly(compiler, log_data, mem_ctx, nir,
+ &prog_data->base, v.cfg,
+ final_assembly_size);
}
+
+ prog_data->base.base.program_size = *final_assembly_size;
+ return assembly;
}