[Mesa-dev] [PATCH 06/21] anv/pipeline: Add populate_tcs/tes_key helpers
Jason Ekstrand
jason at jlekstrand.net
Sat Oct 28 18:36:14 UTC 2017
They don't really do anything interesting, but it's more consistent this
way.
---
src/intel/vulkan/anv_pipeline.c | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 613cfca..8318dea 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -281,6 +281,27 @@ populate_vs_prog_key(const struct gen_device_info *devinfo,
}
static void
+populate_tcs_prog_key(const struct gen_device_info *devinfo,
+ unsigned input_vertices,
+ struct brw_tcs_prog_key *key)
+{
+ memset(key, 0, sizeof(*key));
+
+ populate_sampler_prog_key(devinfo, &key->tex);
+
+ key->input_vertices = input_vertices;
+}
+
+static void
+populate_tes_prog_key(const struct gen_device_info *devinfo,
+ struct brw_tes_prog_key *key)
+{
+ memset(key, 0, sizeof(*key));
+
+ populate_sampler_prog_key(devinfo, &key->tex);
+}
+
+static void
populate_gs_prog_key(const struct gen_device_info *devinfo,
struct brw_gs_prog_key *key)
{
@@ -616,9 +637,10 @@ anv_pipeline_compile_tcs_tes(struct anv_pipeline *pipeline,
unsigned char tcs_sha1[40];
unsigned char tes_sha1[40];
- populate_sampler_prog_key(&pipeline->device->info, &tcs_key.tex);
- populate_sampler_prog_key(&pipeline->device->info, &tes_key.tex);
- tcs_key.input_vertices = info->pTessellationState->patchControlPoints;
+ populate_tcs_prog_key(&pipeline->device->info,
+ info->pTessellationState->patchControlPoints,
+ &tcs_key);
+ populate_tes_prog_key(&pipeline->device->info, &tes_key);
if (cache) {
anv_pipeline_hash_shader(pipeline, tcs_module, tcs_entrypoint,
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list