summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2016-07-12 08:10:18 -0700
committerNanley Chery <[email protected]>2016-07-15 10:35:40 -0700
commit96c664cd03aa59adfecb0478c192097ab07c42d6 (patch)
tree6c350e43412cbc201f43dfe8eef3f00e2b5c5f48 /src
parent1a7344531f133edf879652689d0d739507a08fad (diff)
anv/cmd_buffer: Simplify range member assignment
A ternary is clearer because the range member is assigned one of two values dependant on one condition. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_cmd_buffer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
index 9ceb194425c..6256df8bd72 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -646,11 +646,9 @@ void anv_CmdBindDescriptorSets(
unsigned array_size = set_layout->binding[b].array_size;
for (unsigned j = 0; j < array_size; j++) {
- uint32_t range = 0;
- if (desc->buffer_view)
- range = desc->buffer_view->range;
push->dynamic[d].offset = *(offsets++);
- push->dynamic[d].range = range;
+ push->dynamic[d].range = (desc->buffer_view) ?
+ desc->buffer_view->range : 0;
desc++;
d++;
}