aboutsummaryrefslogtreecommitdiff
path: root/layers/multi.cpp
AgeCommit message (Collapse)Author
2015-11-06bug 15068: Use hardfp calling convention on Android for 32-bit ARM targetsChia-I Wu
Update python scripts. s/(VKAPI \*/(VKAPI_PTR */g s/void VKAPI\b/VKAPI_ATTR void VKAPI_CALL/g s/VkResult VKAPI\b/VKAPI_ATTR VkResult VKAPI_CALL/g s/PFN_vkVoidFunction VKAPI\b/VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL/g s/void\* VKAPI\b/VKAPI_ATTR void* VKAPI_CALL/g https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15068
2015-11-06Moved header files from include to include/vulkanDavid Pinedo
2015-11-04misc: Update author informationCourtney Goeltzenleuchter
Author information was added to any file with the standard license text. Authors were added that added/changed >= 3% of the lines of a file.
2015-11-04misc: switch copyright to ValveCourtney Goeltzenleuchter
2015-11-04misc: Remove Vulkan name from CopyrightCourtney Goeltzenleuchter
2015-11-02bug 14921 part 1: sed renamesChia-I Wu
Workaround header bug (ALLOC_INFO vs AllocateInfo) in vk_helper.py. This affects the debug extensions as well. s/NONDISP/NON_DISPATCHABLE/g s/CmdBuffer/CommandBuffer/g s/cmdBuffer/commandBuffer/g s/CMD_BUFFER/COMMAND_BUFFER/g s/AllocMemory/AllocateMemory/g s/AllocDescriptorSets/AllocateDescriptorSets/g s/AllocCommandBuffers/AllocateCommandBuffers/g s/VkAllocCallbacks/VkAllocationCallbacks/g s/VkSystemAllocScope/VkSystemAllocationScope/g s/allocScope/allocationScope/g s/allocType/allocationType/g s/pfnAlloc\b/pfnAllocation/g s/pfnRealloc\b/pfnReallocation/g s/VK_SYSTEM_ALLOC_/VK_SYSTEM_ALLOCATION_/g s/extName/extensionName/g s/implVersion/implementationVersion/g s/pAppInfo/pApplicationInfo/g s/pMem\b/pMemory/g s/VkMemoryAllocInfo/VkMemoryAllocateInfo/g s/VkDescriptorSetAllocInfo/VkDescriptorSetAllocateInfo/g s/CmdPool/CommandPool/g s/cmdPool/commandPool/g s/CMD_POOL/COMMAND_POOL/g s/VkCommandBufferAllocInfo/VkCommandBufferAllocateInfo/g s/maxTessellationGenLevel/maxTessellationGenerationLevel/g s/maxFragmentDualSourceAttachments/maxFragmentDualSrcAttachments/g s/destSubpass/dstSubpass/g s/destStageMask/dstStageMask/g s/dualSourceBlend/dualSrcBlend/g s/destBlendColor/dstBlendColor/g s/destBlendAlpha/dstBlendAlpha/g s/VK_FORMAT_NUM/VK_FORMAT_RANGE_SIZE/g s/VK_DYNAMIC_STATE_NUM/VK_DYNAMIC_STATE_RANGE_SIZE/g s/pAppName/pApplicationName/g s/appVersion/applicationVersion/g s/numLevels/levelCount/g s/numLayers/layerCount/g s/destOffset/dstOffset/g s/destSubresource/dstSubresource/g s/VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL/VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL/g s/VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL/VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL/g s/VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT/VK_IMAGE_USAGE_TRANSFER_SRC_BIT/g s/VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT/VK_IMAGE_USAGE_TRANSFER_DST_BIT/g s/destBuffer/dstBuffer/g s/destQueueFamilyIndex/dstQueueFamilyIndex/g s/destSet/dstSet/g s/destBinding/dstBinding/g s/destArrayElement/dstArrayElement/g s/VK_BLEND_DEST_COLOR/VK_BLEND_DST_COLOR/g s/VK_BLEND_ONE_MINUS_DEST_COLOR/VK_BLEND_ONE_MINUS_DST_COLOR/g s/VK_BLEND_DEST_ALPHA/VK_BLEND_DST_ALPHA/g s/VK_BLEND_ONE_MINUS_DEST_ALPHA/VK_BLEND_ONE_MINUS_DST_ALPHA/g s/VK_FORMAT_FEATURE_BLIT_SOURCE_BIT/VK_FORMAT_FEATURE_BLIT_SRC_BIT/g s/VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT/VK_FORMAT_FEATURE_BLIT_DST_BIT/g s/VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT/VK_BUFFER_USAGE_TRANSFER_SRC_BIT/g s/VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT/VK_BUFFER_USAGE_TRANSFER_DST_BIT/g s/VK_COMPARE_OP_LESS_EQUAL/VK_COMPARE_OP_LESS_OR_EQUAL/g s/VK_COMPARE_OP_GREATER_EQUAL/VK_COMPARE_OP_GREATER_OR_EQUAL/g s/VkPipelineRasterStateCreateInfo/VkPipelineRasterizationStateCreateInfo/g s/rasterSamples/rasterizationSamples/g s/pRasterState/pRasterizationState/g s/VK_FRONT_FACE_CCW/VK_FRONT_FACE_COUNTER_CLOCKWISE/g s/VK_FRONT_FACE_CW/VK_FRONT_FACE_CLOCKWISE/g s/VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ/VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY/g s/VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ/VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY/g s/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY/g s/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY/g s/VK_STENCIL_OP_INC_CLAMP/VK_STENCIL_OP_INCREMENT_AND_CLAMP/g s/VK_STENCIL_OP_DEC_CLAMP/VK_STENCIL_OP_DECREMENT_AND_CLAMP/g s/VK_STENCIL_OP_INC_WRAP/VK_STENCIL_OP_INCREMENT_AND_WRAP/g s/VK_STENCIL_OP_DEC_WRAP/VK_STENCIL_OP_DECREMENT_AND_WRAP/g s/VK_LOGIC_OP_NOOP/VK_LOGIC_OP_NO_OP/g s/VK_LOGIC_OP_EQUIV\b/VK_LOGIC_OP_EQUIVALENT/g s/memBarrierCount/memoryBarrierCount/g s/ppMemBarriers/ppMemoryBarriers/g s/destImage/dstImage/g s/destImageLayout/dstImageLayout/g s/destCache/dstCache/g s/memOffset/memoryOffset/g s/vk_print_vkmemoryallocinfo/vk_print_vkmemoryallocateinfo/g s/pAllocInfo/pAllocateInfo/g s/memRangeCount/memoryRangeCount/g s/pMemRanges/pMemoryRanges/g s/VK_IMAGE_TYPE_NUM/VK_IMAGE_TYPE_RANGE_SIZE/g s/VK_PIPELINE_BIND_POINT_NUM/VK_PIPELINE_BIND_POINT_RANGE_SIZE/g s/vk_size_vkdescriptorsetallocinfo/vk_size_vkdescriptorsetallocateinfo/g s/remap_cmdbuffers/remap_commandbuffers/g s/remap_cmdpool/remap_commandpool/g s/add_to_cmdbuffers_map/add_to_commandbuffers_map/g https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14921 a
2015-11-02bug 12921: Memory callback (WIP)Chia-I Wu
The per-object allocator is ignored for now. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=12921
2015-10-23Bug 14621: Change vkGet* functions to not return VkResultCourtney Goeltzenleuchter
2015-09-10vulkan.h: Change return types of some functions to voidMark Lobodzinski
Functions that should be thought of as "impossible to fail in the face of valid parameters" have had their return types changed to void. This includes all of the vkDestroy functions, vkFreeMemory, and vkUnmapMemory. vkUpdateDescriptorSets is also included, because of the frequency the function is expected to be called.
2015-08-12layers: Make multi layer functional again as a multi layer per libraryJon Ashburn
Pretty much a total rewrite of this layer. Make multi1 a Device layer and multi2 an Instance layer. Remove all extension and layer property stuff, rely on manifest file. Remove all old common stuff, rely on newer loader/layer interface which can handle multiple layers pre library via manifest file.
2015-07-17v127: Use PFN_vkVoidFunction for GetProcAddrCourtney Goeltzenleuchter
2015-07-10misc: Support Pipeline caches and multi pipeline create, bug 14033 API changesJon Ashburn
2015-07-07Multi: Update to latest extension & layer supportCourtney Goeltzenleuchter
2015-07-07loader: Rename loader_platform.h -> vk_loader_platform.hTobin Ehlis
2015-07-07include: Rename vkLayer.h -> vk_layer.h and vkIcd.h -> vk_icd.hTobin Ehlis
2015-06-29loader: Move CreateDevice to device tableCourtney Goeltzenleuchter
Discovered an issue where a layer was doing cleanup in it's DestroyDevice function but the CreateDevice was never called. This happened because the extension was only enabled on the device chain and the device chain doesn't actually call CreateDevice. That happens on the Instance chain. Making it so that we can call down the device chain - which is terminated by the ICD. We need to know the real device object to construct the device chain heiarchy and when calling down the device chain it should end with the ICD doing the actual device object creation. This patch fixes the issue by using the same process as CreateInstance. The loader will call the ICD's CreateDevice and pass that in the *pDevice argument. The layers then ignore the PhysicalDevice parameter and use the *pDevice to access the device chain. To prevent the ICD from being called twice needed to stub in a special loader_GetDeviceChainProcAddr to provide a stub for only CreateDevice as the end of the chain. integrate review feedback.
2015-06-25vulkan.h: V108 -- Static Types, Bug# 13919Tony Barbour
2015-06-18layers: Make dispatch table thread safeJon Ashburn
2015-06-17loader: Support layers that don't have an extension entrypointJon Ashburn
Change all layers and loader interface to init dispatch tables on GPA("GetXXXProcAddr"). After that initialization rest of dispatch tables are inited via unwrapped object using the GPA in the dispatch table. This also allows App generated GPA calls that the loader can't resolve to function correctly.
2015-06-17extensions: begin changes for extension supportCourtney Goeltzenleuchter
This patch starts restructuring the various components (loader, driver, layers, etc.) to support global and device extensions. Require GetProcAddr to access the extension functions and related support.
2015-06-17layers: Add DestroyDevice and DestroyInstance hooking to deinitialize tablesJon Ashburn
Table maps need to get cleaned up at DestroyInstance and DestroyDevice
2015-06-17layers: GPA table initialization shouldn't recurseJon Ashburn
2015-06-17misc: Change vkGetProcAddr to vkGetDeviceProcAddrJon Ashburn
Also cleanup layer/loader GPA's to only return device level entrypoints.
2015-06-17layers: Use objects dispatch table for key to layer mapsJon Ashburn
Since the object may vary but the dispatch table may be same, use dispatch table as the key to various table maps rather than emplace method to add new map key. This eliminates the need for layers that support multiple devices or instances to add entrypoints on the object creation calls.
2015-06-17misc: Loader and Layers move device chain activation to CreateDeviceJon Ashburn
2015-06-17layers: Add initialization of instance dispatch tableJon Ashburn
Make the layer init separate from either device or instance dispatch table init, since these are done at different times.
2015-06-17layers: Add GetInstanceProcAddr() to all layersJon Ashburn
Loader will use this for constructing instance layer instance chains. Layer instance dispatch table is not yet added.
2015-04-22misc: Changes to fix warnings in Windows / VC++ buildTony Barbour
2015-04-22vkEnumerateLayers: Update to match upstreamCourtney Goeltzenleuchter
The upstream vulkan.h header removed maxLayerCount parameter from vkEnumerateLayers. This patch implements that change for the sample driver and layers.
2015-04-17update to vulkan.h header version 90, bug 13529Mike Stroyan
2015-04-16Bug 13632 Header 84 Assorted questions and comments on vulkan.hTony Barbour
2015-04-16layers: Removing old GetExtensionSupport API callTobin Ehlis
2015-04-16vulkan: Add vkGetGlobalExtensionInfo entrypointJon Ashburn
have loader use it to enumerate all extensions from layers and drivers. Non-gode_gen layers also updated to include vkGetGlobalExtensionInfo Includes verion info as part of GetExtensionSupport return data. TODO: vk-layer-generate needs work v2: do not check for non-existing ENABLE_WSI_X11 (olv)
2015-04-16layers: Remove wrapping of GPU objects by loader and layersJon Ashburn
Loader only wraps GPU objects for creating a layer chain. After layer activation layers and loader use unwrapped gpu object returned by the driver. This is a large simplification. This fixes a nasty bug where layers intercepting entrypoints with gpu objects but not all these entrypoints would fail. These would cause non-uniform unwrapping of gpu objects by the time the driver was called with a gpu object. Fixes issue in loader_get_icd where it was trying to compare a wrapped GPU against a non-wrapped GPU.
2015-04-16loader: refactor layer activation function to handle more general inputsJon Ashburn
Renamed structure types as well. TODO: verify vk-layer-generate.py v2: fix LoaderEntrypointsSubcommand (olv)
2015-04-16vulkan: beautification changesCourtney Goeltzenleuchter
TODO: verify vk-layer-generate.py TODO: need to rename object tracker generator v2: fix "python3 vulkan.py" fix dead cod in tri introduced by rebase beautify wsi_null.c (olv)
2015-04-16vulkan: API renamingCourtney Goeltzenleuchter
VK_DEVICE_QUEUE_CREATE_INFO => VkDeviceQueueCreateInfo VK_DEVICE_CREATE_INFO => VkDeviceCreateInfo VK_INSTANCE_CREATE_INFO => VkInstanceCreateInfo VK_LAYER_CREATE_INFO => VkLayerCreateInfo VK_MEMORY_ALLOC_INFO => VkMemoryAllocInfo VK_MEMORY_ALLOC_IMAGE_INFO => VkMemoryAllocImageInfo VK_MEMORY_ALLOC_BUFFER_INFO => VkMemoryAllocBufferInfo VK_BUFFER_CREATE_INFO => VkBufferCreateInfo VK_BUFFER_VIEW_CREATE_INFO => VkBufferViewCreateInfo
2015-04-16Stage 1 of renameCourtney Goeltzenleuchter
TODO: re-enable glave build, advance API for glave v2: get rid of outdated code in tri introduced by rebase rename wsi_null.c (olv)
2015-04-16layers: Update GetExtensionSupport() to handle queries for layer nameJon Ashburn
Layers now support loader querying their layer name via GetExtensionSupport in addition to EnumerateLayers. Also fixed bugs in ObjectTracker and DrawState to add the extensions they support in the GetExtensionSupport queries. Conflicts: xgl-layer-generate.py
2015-02-12Win: Attempt to keep from using Linux functions.Ian Elliott
This is a hopefully-temporary solution to prevent some of the problems of people breaking the Windows build while developing on Linux (or vice-versa). This uses macros of the names of Linux/Windows-specific functions in order to catch people who use those functions directly, instead of using the platform-compatibility-layer functions. In order to avoid problems with the layers #include'ing "loader_platform.h" before they #include system files (which can mess them up), I #include "loader_platform.h" twice. The 2nd time, it #define's the hopefully-temporary macros. Note: For some reason, we can't #define LoadLibrary(). It generates warnings on Windows.
2015-02-04Can compile "loader" and "layers" on Windows and Linux ...Ian Elliott
These directories build and are partially turned-on on Windows, using the "tri" demo (follow-on commit) and a "NULL driver" that was created out of the sample/Intel driver. The GetProcAddress() is not yet finding symbols in the NULL driver. For now: - "C:\Windows\System32" is the default XGL driver directory. The getenv() isn't yet working. I suggest creating your own #define in order to point to where a driver is. - In order to recognize a Windows driver, we must look at both its prefix and suffix (i.e. it is named "XGL_*.dll", e.g. "XGL_i965.dll). - We autogenerate Windows ".def" files for the layers. Additional info is: - This is necessary in order for a DLL to export symbols that can be queried using GetProcAddress(). We can't use the normal Windows approach of declaring these functions using "__declspec(dllexport)", because these functions are declared in "xgl.h". - This involves adding and running the new "xgl-win-def-file-generate.py" file. - NOTE: Layers don't have the xglInitAndEnumerateGpus() entrypoint, just the xglGetProcAddr() entrypoint (and now the xglEnumerateLayers() entrypoint). Generating them is pretty simple. NOTE: In order to build on a 64-bit Windows 7/8 system, I did the following: - Install VisualStudio 2013 Professional - Install CMake from: http://www.cmake.org/cmake/resources/software.html - I let it add itself to the system PATH environment variable. - Install Python 3 from: https://www.python.org/downloads - I let it add itself to the system PATH environment variable. - Obtain the Git repository, checkout the "ian-150127-WinBuild" branch. - Using a Cygwin shell: I did the following: - "cd" to the top-level directory (i.e. the one that contains the ".git" directory). - "mkdir _out64" - "cd _out64" - "cmake -G "Visual Studio 12 Win64" .." - At this point, I used WindowsExplorer to open the "XGL.sln" file. I can build. CMake causes the build shortcut to be "Ctrl-Shift-B" instead of the normal "F7". I had to right-click the "ALL_BUILD" project, go to Properties->Debugging and change the debug Command and Working Directory to point to "tri.exe" and where the executable are. At this point, I can debug (using the normal "F5" shortcut).
2015-02-04All of the codegen for layers is now working well enough that the generated ↵Tobin Ehlis
layers will compile. Lots of updates required to DrawState and MemTracker layers so just commenting them out the build initially. Conflicts: layers/draw_state.c layers/multi.cpp xgl-layer-generate.py xgl.py
2015-02-04xgl: Remove XGL_* typedef wrappersMark Lobodzinski
Part of moving to xgl.h rev#38, svn rev 29293-29302
2015-02-04layers: Update BeginCommandBuffer API for Tiler GpusJon Ashburn
2015-02-04xgl: Add xgl header changes for rev30 and 31.Mark Lobodzinski
Switched EnumerateLayer parameter order, added conditional definition of xgl function prototypes, and prepended 'xgl' to all function prototypes. This included fixes for bugs #13173 and #13180.
2015-02-04layers: simplify xglGetProcAddr() for Basic and MultiChia-I Wu
Layers should only handle interested XGL entrypoints in their xglGetProcAddr(), and chain to the next layer. Handling everything using the cached results in pTable is not much faster. There should be no functional difference with this change.
2015-02-04layers: simplify initLayerTable()Chia-I Wu
Generate xgl_dispatch_table_helper.h with $ ./xgl-generate.py dispatch-table-ops layer and make use of layer_initialize_dispatch_table() in initLayerTable(). There should be no functional difference with this change.
2015-02-04remove unnecessary casting between XGL_CHAR/charChia-I Wu
Many of the changed lines are generated. That should be fixed at some point.
2014-12-02layers: Add Multi layer with example of multiple layers per file.Jon Ashburn