aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-03-19[vulkan] Merge CommandBuffer End and SubmitAndReset. (#384)dan sinclair
The End command is always immediately followed by SubmitAndReset. This CL merges the two methods and removes the End calls.
2019-03-19 [vulkan] Wrap render pass into RAII object. (#382)dan sinclair
This Cl wraps the begin/end render pass calls inside a RAII object. This removes the possibility of having called begin render pass without subsequently calling end.
2019-03-18 Add a PipelineCommand class. (#380)dan sinclair
This CL adds a new subclass of Command, PipelineCommand. The Probe commands do not have pipelines so they inherit from Command. Other commands inherit from PipelineCommand.
2019-03-18 Remove pipeline from probe commands. (#377)dan sinclair
This CL updates the probe commands to contain the buffers needed instead of providing the pipeline.
2019-03-18Integrate PPM unit tests. (#379)dan sinclair
This Cl integrates the PPM test into the test suite. Part of this work involved updating the conversion code to return a vector<uint8_t> instead of a std::string.
2019-03-17Guard against missing framebuffer pointer (#376)dan sinclair
2019-03-17[vulkan] Add missing result check (#375)dan sinclair
2019-03-14[AmberScript] Implement EXPECT EQ_RGB(A)? parsing (#367)dan sinclair
This CL adds the EXPECT parsing for EQ_RGB and EQ_RGBA expectations. This is enough to allow a clear.amber script to be written. Issue #345.
2019-03-14 [vulkan] remove Shutdown methods. (#366)dan sinclair
This CL moves Shutdown methods to destructors where possible.
2019-03-13Remove unused descriptor code (#365)dan sinclair
2019-03-13[vulkan] Unhook push_constant from resource. (#364)dan sinclair
This CL removes the parent class from PushConstant. There was nothing in Resource which the PushConstant code used othe than storing a few variables.
2019-03-13Simplify vulkan/resource classes. (#363)dan sinclair
This CL moves code from the Resource class to the single subclass which uses that code. This simplifies the resource class and makes it clearer where memory is used.
2019-03-13Rename vulkan/image to vulkan/transfer_image. (#361)dan sinclair
Similar to the vulkan/transfer_buffer class the transfer_image class is responsible for transfering data to/from the GPU for images. This CL renames Image to TransferImage to make that clearer.
2019-03-13 Remove unused method. (#360)dan sinclair
This Cl removes the unused GetFormatForAttachment method.
2019-03-13 Rename vulkan/buffer to vulkan/transfer_buffer. (#359)dan sinclair
There are currently a lot of buffers in the system. This CL renames the vulkan/buffer class to be vulkan/transfer_buffer. This makes it a bit clearer that this is used to transfer data to/from the GPU.
2019-03-13Remove GetDescriptorInfo and store in Buffer object. (#358)dan sinclair
This Cl stores the relevant data into the amber::Buffer and removes the need to call GetDescriptorInfo to retrieve the data.
2019-03-13 Store framebuffer info into buffers. (#357)dan sinclair
This CL removes the GetFrameBufferInfo method and stores the various bits of information into the Buffer objects.
2019-03-13 Add buffer to probe command. (#356)dan sinclair
This CL extends the ProbeCommand to contain the buffer to probe against. With VkScript there is a generated image buffer which is used. For AmberScript the buffer is provided in the EXPECT command.
2019-03-12Store BufferType in buffer. (#355)dan sinclair
Previously the buffer type existed in both the Buffer and Pipeline::BufferInfo. These buffer types could diverge, which could cause issues with thinking the buffer is of an incorrect type. This CL removes the buffer type from BufferInfo and always uses the buffer to retrieve the type.
2019-03-12Implement --log-graphics-calls-time flag (#351)Hugues Evrard
Add the necessary Delegate methods to implement timing of graphics API calls.
2019-03-12[vulkan] Set correct colour attachment locations. (#353)dan sinclair
This CL fixes the colour attachment code to set the colour attachment into the requested location, not the order they were attached. This allows setting the locations out of order. Note, the locations must be a complete set of numbers starting from 0.
2019-03-11Remove irrelevant dawn namespace (#350)Hugues Evrard
2019-03-08Add Delegate and --log-graphics-calls flag (#334)Hugues Evrard
This adds a Delegate which enables users of the amber library to define some hook functions as they like. The first usage here is a Delegate::Log() function to log graphics API calls. In practice, a pointer to the delegate object is passed at engine creation and the Vulkan engine eventually pass it to LoadVulkanPointers() which calls the functions produced by update_vk_wrappers.py. This enable to choose, when loading the Vulkan functions, whether to load a straighforward wrapper to the API command, or to load a lambda that surround the API command with calls to the delegate methods. The --log-graphics-calls flag in the samples sets the delegate to produce a log of API calls.
2019-03-07[vulkan] Support multiple colour attachments. (#340)dan sinclair
This CL updates the vulkan engine to allow having multiple image attachments. Currently the frontend code just works with the first image attachment.
2019-03-07Build with local vulkan data if requested (#319)dan sinclair
This CL adds a flag AMBER_USE_LOCAL_VULKAN which if set when running cmake will have amber use the vulkan header and loaders out of the third_party directory. This should let amber try to build on a system without vulkan so the build can be tested on the bots.
2019-03-07Parse CLEAR command (#339)dan sinclair
This CL adds parsing for the CLEAR command in AmberScript.
2019-03-07 [vulkan] Remove SetBuffer. (#337)dan sinclair
This CL removes the SetBuffer method and inlines the parts into the CreatePipeline method as necessary.
2019-03-07[amberscript] Implement RUN for compute and DRAW_RECT. (#335)dan sinclair
This CL adds parsing of the RUN commands for compute and DRAW_RECT instances to AmberScript.
2019-03-07[vulkan] fix shadow variable (#338)dan sinclair
2019-03-06Allow multiple pipelines to execute. (#331)dan sinclair
This CL updates amber (and the vulkan backend) to work with multiple pipelines. The vulkan backend is changed to store a PipelineData structure with the colour/depth formats, vertex data and the vulkan pipeline for a given amber::Pipeline. Each command is changed to take the pipeline it is associated with, those pipelines are used when executing the commands.
2019-03-05[vulkan] Generate wrapper functions for vulkan methods. (#328)dan sinclair
This CL adds a update_vk_wrappers.py script which is executed during the build. The script will generate src/vk-wrappers.h and src/vk-wrappers.inc files into the binary directory. The .h file lists the struct entries for the VulkanPtr struct. The vk-wrappers.inc file contains the code to load the vulkan function pointers. If the vk.xml file is found, the wrappers will be lambdas, if vk.xml is not found they're straight function pointers. This should allow us to work with the CTS as we do now. Issue #324.
2019-03-05Add Amber::AreAllRequirementsSupported (#321)David Neto
It determines if the engine satisfies all requirements declared in the recipe.
2019-02-26Fix debug build (#320)Hugues Evrard
Replace assertions by proper Result() returns
2019-02-26[vulkan] Don't store pipeline_layout or pipeline. (#317)dan sinclair
Currently the pipeline_layout and pipeline _may_ get destroyed between compute/draw calls. As such, there is a bunch of code to check and re-create if needed. This Cl changes the code to no longer store pipeline_ or pipeline_layout_ in the vulkan/pipepline object. Instead, both the layout and pipeline are created each draw/compute call.
2019-02-21[vulkan] Code cleanup (#310)dan sinclair
This CL cleans up various things in the src/vulkan directory. Code is moved closer to usage if a subclass is the only caller. CommandBuffer and CommandPool are passed instead of VkCommandBuffer and VkCommandPool.
2019-02-21Output requested images/buffers on probe failure. (#316)dan sinclair
This Cl updates the sample app to allow dumping of image and buffer data even if the probes fail to execute. Fixes #314.
2019-02-21Add fbsize require setting (#315)dan sinclair
This CL adds parsing for the `fbsize 200 200` requirement to set the framebuffer size for a given script. Fixes #12.
2019-02-21 Allow specifiying variable pointers in requirements. (#313)dan sinclair
This CL adds the two requirements: * VariablePointerFeatures.variablePointers * VariablePointerFeatures.variablePointersStorageBuffer Variable pointers requires VK_KHR_get_physical_properties2 and the variable pointer extension are both requested.
2019-02-21fixup shadow variable (#312)dan sinclair
2019-02-21 Hold required features as strings. (#309)dan sinclair
This CL keeps the required features as strings as long as possible. This will allow extending the list of features with additional entries.
2019-02-20Convert PushConstant to use a vector. (#305)dan sinclair
Instead of allocating an array of uint8_t's and storing into a unique_ptr, this CL changes the PushConstant code to have a std::vector<uint8_t> instead. Issue #277.
2019-02-20 Allow querying vkGetPhysicalProperties2 (#308)dan sinclair
This CL adds the code to query for physical properties2 if the VK_KHR_get_physical_device_properties2 extension is required.
2019-02-20Differentiate between instance and device extensions. (#304)dan sinclair
This CL adds the necessary code to differentiate that VK_KHR_get_physical_device_properties2 is an instance extension and not a device extension.
2019-02-20Add -ps option to allow compiling shaders. (#303)dan sinclair
This CL adds a -ps option to the sample app to allow parsing the script and creating the pipeline. This will cause the driver SPIR-V compiler to execute. The script is not run against the engine (and the engine is not created).
2019-02-19Fixup sample app buffer parsing (#300)dan sinclair
This CL fixes the -B flag to default to 0:0 if not provided. It also fixes the code to use : as the separator instead of ,
2019-02-19Fixup image buffer dump (#299)dan sinclair
This CL updates the image dumping code to the new default framebuffer format of B8G8R8A8_UNORM.
2019-02-19Vulkan: support buffer dump (#269)Jaebaek Seo
This CL adds support to dump the contents of compute buffers to a file. Fixes #36
2019-02-15 Move pipeline setup out of executor (#289)dan sinclair
This CL moves the code to setup shaders and buffers out of the executor and into the CreatePipeline method. This way each engine can deterine how to setup the data needed.
2019-02-14Initialize the impl_ field of RecipeImpl to null, to avoid problems deleting ↵Alastair Donaldson
it if it has not been initialized. (#295)
2019-02-13More casts to make CTS happy. (#291)dan sinclair