summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_entrypoints_gen.py
Commit message (Collapse)AuthorAgeFilesLines
* anv: Make entrypoint resolution take a gen_device_infoJason Ekstrand2016-10-141-14/+6
| | | | | | | | | | | | In order for things such as the ANV_CALL and the ifuncs to work, we used to have a singleton gen_device_info structure that got assigned the first time you create a device. Given that the driver will never be used simultaneously on two different generations of hardware, this was fairly safe to do. However, it has caused a few hickups and isn't, in general, a good plan. Now that the two primary reasons for this singleton are gone, we can get rid of it and make things quite a bit safer. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: Get rid of the ANV_CALL macroJason Ekstrand2016-10-141-1/+1
| | | | | | | | This macro was needed by meta in order to make gen-specific calls from gen-agnostic code. Now that we don't have meta, the remaining two uses are fairly trivial to get rid of. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/entrypoints: Save off the entire devinfo rather than a pointerJason Ekstrand2016-10-061-5/+5
| | | | | | | | | Since the gen_device_info structs are no longer just constant memory, a pointer to one is not a pointer to something in the .data section so we shouldn't be storing it in a static variable. Instead, we should just store the entire device_info structure. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* intel: s/brw_device_info/gen_device_info/Jason Ekstrand2016-09-031-3/+3
| | | | | | | | | | | | | Generated by: sed -i -e 's/brw_device_info/gen_device_info/g' src/intel/**/*.c sed -i -e 's/brw_device_info/gen_device_info/g' src/intel/**/*.h sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.c sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.cpp sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.h Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* anv: do not export the Vulkan APIEmil Velikov2016-08-181-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | With version 1 of the Loader interface there is an internal/private symbol (vk_icdGetInstanceProcAddr) which is used to retrieve all the API from the Vulkan entrypoints from the ICD. Implying that exposing the Vulkan API is not recommended. Version 2 goes a step further explicitly forbiding the ICD from exposing Vulkan symbols (and adding a negotiation API) As a reference: - Nvidia 367.35 Missing negotiation API - version 1. Exposes only vk_icdGetInstanceProcAddr. - AMD 16.30.3.306809 Have negotiation API - version 2, Exposes vk_icdGetInstanceProcAddr. Exposes a couple of Vulkan entry points - seems to be in violation with the spec. Cc: "12.0" <mesa-stable@lists.freedesktop.org> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: remove internal 'validate' layerEmil Velikov2016-08-181-35/+11
| | | | | | | | | | | Presently the layer has only a single entry point. As mentioned by Jason the function does not validate anything that isn't checked elsewhere, thus we can drop the whole thing. Cc: "12.0" <mesa-stable@lists.freedesktop.org> Cc: Jason Ekstrand <jason@jlekstrand.net> Suggested-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* anv/entrypoints: Rework #if guardsJason Ekstrand2016-06-101-7/+9
| | | | | | | | | | | | | | | This reworks the #if guards a bit. When Emil originally wrote them, he just guarded everything. However, part of what anv_entrypoints_gen.py generates is a hash table for looking up entrypoints based on their name. This table *cannot* get out of sync between C and python regardless of preprocessor flags. In order to prevent this, this commit makes us use void pointers in the dispatch table for those entrypoints which aren't available. This means that the dispatch table size and entry order is constant and it should never get out-of-sync with the python. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Emil Velikov <emil.velikov@collabora.com> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
* anv/entrypoints: Use the function pointer types provided by vulkan.hJason Ekstrand2016-06-101-1/+1
| | | | | | | | | This is a bit cleaner than generating the types ourselves when making the table. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Emil Velikov <emil.velikov@collabora.com> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
* anv/entrypoints: Emit #if guards for all platformsJason Ekstrand2016-06-071-10/+22
| | | | Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* anv: let anv_entrypoints_gen.py generate proper Wayland/Xcb guardsEmil Velikov2016-05-311-0/+28
| | | | | | | | | | | | | | The generated sources should follow the example set by the vulkan headers and our non-generated code. Namely: the code for all supported platforms should be available, each one guarded by its respective VK_USE_PLATFORM_*_KHR macro. v2: Reword commit message. Cc: Mark Janes <mark.a.janes@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96285 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1 over IRC)
* anv: Don't assert-fail if someone asks for a non-existent entrypointJason Ekstrand2016-03-221-1/+0
|
* Move the intel vulkan driver to src/intel/vulkanJason Ekstrand2016-02-181-0/+324