diff options
author | Jason Ekstrand <[email protected]> | 2017-03-22 15:37:17 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-05-03 11:25:46 -0700 |
commit | 0db70703300938356e8f3bef33e5826efc0b10c3 (patch) | |
tree | 0f15f8dc9e61fa0e870616654dd76b41dd9692b8 /src/intel/vulkan/anv_pipeline.c | |
parent | ca5bdfdfc68c065980db2dd06a5979c2c4fe674b (diff) |
anv/pipeline: Add shader lowering for multiview
v2 (Jason Ekstrand):
- Take a view_mask rather than a whole subpass
- Build the view mask into the VS shader key
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 85b3290e7b4..643db9cb9f2 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -339,6 +339,10 @@ anv_pipeline_hash_shader(struct anv_pipeline *pipeline, struct mesa_sha1 ctx; _mesa_sha1_init(&ctx); + if (stage != MESA_SHADER_COMPUTE) { + _mesa_sha1_update(&ctx, &pipeline->subpass->view_mask, + sizeof(pipeline->subpass->view_mask)); + } if (pipeline->layout) { _mesa_sha1_update(&ctx, pipeline->layout->sha1, sizeof(pipeline->layout->sha1)); @@ -372,6 +376,9 @@ anv_pipeline_compile(struct anv_pipeline *pipeline, NIR_PASS_V(nir, anv_nir_lower_push_constants); + if (stage != MESA_SHADER_COMPUTE) + NIR_PASS_V(nir, anv_nir_lower_multiview, pipeline->subpass->view_mask); + nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); /* Figure out the number of parameters */ |