aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-02-26 16:54:29 +1300
committerChris Forbes <chrisforbes@google.com>2016-03-04 08:57:28 +1300
commitea7d41a53eeb7d28d9e461dbb8118b75245553df (patch)
treeaaa5481a54bbe6b66aef43268185ad8ef1ad091e
parenta12668211bea9da0a7a1059bb300e24855f91fd7 (diff)
downloadusermoji-ea7d41a53eeb7d28d9e461dbb8118b75245553df.tar.xz
layers: move get_shader_stage_id up a bit
We're about to need this in another place too Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--layers/draw_state.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 7be62c69..9876f1e9 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -1003,6 +1003,14 @@ get_fundamental_type(shader_module const *src, unsigned type)
}
}
+
+static uint32_t get_shader_stage_id(VkShaderStageFlagBits stage)
+{
+ uint32_t bit_pos = u_ffs(stage);
+ return bit_pos-1;
+}
+
+
static bool
validate_vi_consistency(layer_data *my_data, VkDevice dev, VkPipelineVertexInputStateCreateInfo const *vi)
{
@@ -1302,12 +1310,6 @@ has_descriptor_binding(layer_data* my_data,
return (bindingMap.find(slot.second) != bindingMap.end());
}
-static uint32_t get_shader_stage_id(VkShaderStageFlagBits stage)
-{
- uint32_t bit_pos = u_ffs(stage);
- return bit_pos-1;
-}
-
// Block of code at start here for managing/tracking Pipeline state that this layer cares about
static uint64_t g_drawCount[NUM_DRAW_TYPES] = {0, 0, 0, 0};