diff options
author | Jason Ekstrand <[email protected]> | 2015-11-17 06:30:02 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-11-17 08:27:51 -0800 |
commit | aa3002bd42c0fcd70dbeff7a3c2b049e048c0009 (patch) | |
tree | e39a31e0de8a5af23dc78b0ff9dbcc16419cacd8 /src/vulkan/anv_entrypoints_gen.py | |
parent | 0508046dc839a2ebd2800f169b45f2d3243dcda6 (diff) |
anv/entrypoints: Use devinfo instead of a gen number
Diffstat (limited to 'src/vulkan/anv_entrypoints_gen.py')
-rw-r--r-- | src/vulkan/anv_entrypoints_gen.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/vulkan/anv_entrypoints_gen.py b/src/vulkan/anv_entrypoints_gen.py index 0fa677bbe02..bb250602b25 100644 --- a/src/vulkan/anv_entrypoints_gen.py +++ b/src/vulkan/anv_entrypoints_gen.py @@ -91,7 +91,7 @@ if opt_header: print " };\n" print "};\n" - print "void anv_set_dispatch_gen(uint32_t gen);\n" + print "void anv_set_dispatch_devinfo(const struct brw_device_info *info);\n" for type, name, args, num, h in entrypoints: print "%s anv_%s%s;" % (type, name, args) @@ -193,12 +193,12 @@ determine_validate(void) enable_validate = atoi(s); } -static uint32_t dispatch_gen; +static const struct brw_device_info *dispatch_devinfo; void -anv_set_dispatch_gen(uint32_t gen) +anv_set_dispatch_devinfo(const struct brw_device_info *devinfo) { - dispatch_gen = gen; + dispatch_devinfo = devinfo; } void * __attribute__ ((noinline)) @@ -207,7 +207,12 @@ anv_resolve_entrypoint(uint32_t index) if (enable_validate && validate_layer.entrypoints[index]) return validate_layer.entrypoints[index]; - switch (dispatch_gen) { + if (dispatch_devinfo == NULL) { + assert(anv_layer.entrypoints[index]); + return anv_layer.entrypoints[index]; + } + + switch (dispatch_devinfo->gen) { case 8: if (gen8_layer.entrypoints[index]) return gen8_layer.entrypoints[index]; |