summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-09-10 21:27:13 -0700
committerJason Ekstrand <[email protected]>2017-10-16 08:04:56 -0700
commitb03b19f558ca167fbdcacf743cb6b28fe8e046bf (patch)
tree2dd158d31a95a1a90a1b16cb23df821a3fa8549e
parent9cec35579c91fc5b24607e1b0de2562b29bbc6ba (diff)
anv: Get rid of gen fall-through
In the early days of the Vulkan driver, we thought it would be a good idea to just make genN just fall back to the genN-1 code if it didn't need to be any different for genN. While this seemed like a good idea, it ultimately ended up being far simpler to just recompile everything. We haven't been using the fall-through functionality for some time so we're better off just deleting it so it doesn't accidentally start causing problems. Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index bf376a881f4..a4ecbf2b817 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -160,31 +160,31 @@ anv_resolve_entrypoint(const struct gen_device_info *devinfo, uint32_t index)
return anv_layer.entrypoints[index];
}
+ const struct anv_dispatch_table *genX_table;
switch (devinfo->gen) {
case 10:
- if (gen10_layer.entrypoints[index])
- return gen10_layer.entrypoints[index];
- /* fall through */
+ genX_table = &gen10_layer;
+ break;
case 9:
- if (gen9_layer.entrypoints[index])
- return gen9_layer.entrypoints[index];
- /* fall through */
+ genX_table = &gen9_layer;
+ break;
case 8:
- if (gen8_layer.entrypoints[index])
- return gen8_layer.entrypoints[index];
- /* fall through */
+ genX_table = &gen8_layer;
+ break;
case 7:
- if (devinfo->is_haswell && gen75_layer.entrypoints[index])
- return gen75_layer.entrypoints[index];
-
- if (gen7_layer.entrypoints[index])
- return gen7_layer.entrypoints[index];
- /* fall through */
- case 0:
- return anv_layer.entrypoints[index];
+ if (devinfo->is_haswell)
+ genX_table = &gen75_layer;
+ else
+ genX_table = &gen7_layer;
+ break;
default:
unreachable("unsupported gen\\n");
}
+
+ if (genX_table->entrypoints[index])
+ return genX_table->entrypoints[index];
+ else
+ return anv_layer.entrypoints[index];
}
/* Hash table stats: