Mesa (master): zink: refactor vertex-order emitting
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Feb 2 16:10:20 UTC 2021
Module: Mesa
Branch: master
Commit: a7d9ac2956253f4b7f65e1caef1a3394d3e2f29f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a7d9ac2956253f4b7f65e1caef1a3394d3e2f29f
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Tue Feb 2 13:00:29 2021 +0100
zink: refactor vertex-order emitting
Using a ternary expression inside the argument list avoids some
repetition, showing that the rest of the call is the same. This increase
readability a tad.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832>
---
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index 56fb381b36b..df5848369ec 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -3484,10 +3484,9 @@ nir_to_spirv(struct nir_shader *s, const struct zink_so_info *so_info,
case MESA_SHADER_TESS_EVAL:
spirv_builder_emit_exec_mode(&ctx.builder, entry_point,
get_primitive_mode(s->info.tess.primitive_mode));
- if (s->info.tess.ccw)
- spirv_builder_emit_exec_mode(&ctx.builder, entry_point, SpvExecutionModeVertexOrderCcw);
- else
- spirv_builder_emit_exec_mode(&ctx.builder, entry_point, SpvExecutionModeVertexOrderCw);
+ spirv_builder_emit_exec_mode(&ctx.builder, entry_point,
+ s->info.tess.ccw ? SpvExecutionModeVertexOrderCcw
+ : SpvExecutionModeVertexOrderCw);
spirv_builder_emit_exec_mode(&ctx.builder, entry_point,
get_spacing(s->info.tess.spacing));
if (s->info.tess.point_mode)
More information about the mesa-commit
mailing list