This replaces instances of `#ifdef MACRO_NAME` with `#if MACRO_NAME` as now
MACRO_NAME will have a value of 0 or 1, instead of it being defined or not
defined.
Change-Id: I27a4330511a0f0d779f41851fe816fc79e868de2
Make sure the work space is clean before starting a test, this is mainly for developer builds, as CI
runs will generally wipe the entire build tree instead.
Main issue was getting function redireciton to work, dyld-interposer accomplishes that.
It required making the shim-library a dylib, but otherwise only required minor changes.
Change-Id: I7b7e2c86cc0c0b082f58241a7e146b74af72e792
Since the loader only uses environment variables if the process is
not running with elevated priviledges, the test harness needs to be
able to control that aspect to ensure consistency as CI systems may
run the tests in an 'elevated' context.
Change-Id: I8b15a1ecd4ab4960049ba198af8199943e872bba
Move windows specific error reporting to test_util.h
This allows for its use anywhere its required.
Change-Id: I14a0da85dc0d3f4e651b99aa005469b47d98d940
_stdcall in Windows x86 builds would mangle names even with `export "C"`
By adding .def files, the correct name is used in the .dll and the loader will
correctly load it.
Additionally, ShimEnumAdapters2 needs _stdcall for 32 bit mode
Change-Id: Ia60a5e2a9e4378dc3e09864648e04852b10fe524
These files are the current 4 source code files used to create the
regression test suite
loader_regression_tests.cpp and loader_version_tests.cpp contain a
majority of the tests.
loader_wsi_test.cpp is all the tests pertaining to the WSI functions
in the loader.
loader_testing_main.cpp contains the `main()` which has windows CRT
specific calls to disable popups and debug aserts.
There are two executables created, test_regression and test_wsi.
test_regression is both regression_tests and version_tests. test_wsi
is the WSI tests. These tests are separate as they rely on linking
with platform specific windowing libraries which may not be present
on a CI system.
Change-Id: I1c02b0f82826d337599f4a9a7c02dde40ea5afa3
The test environment is the code which glues the platform shim,
TestICD, and TestLayers together so that test code can be easily
written. The main components tests use are the SingleICDShim and
MultipleICDShim classes. Both take care of copying the ICD binaries,
setting up the manifests, and redirecting the platform specific
systems to point at those manifests.
Change-Id: I7cbb76c9555fe13b323173c3838cbb3616b77a18
At the present moment, this change is to define simple layer
utilities that tests in the future may use.
Change-Id: I9ab5e1950da64061997891a0527d0f70a49e41e7
The loader queries various platform systems for info such as the
location of ICDs and layers. To isolate the loader during testing
from the system it is running on, the platform shim intercepts the
necessary functions so that the contents of the systems queried by
the loader can be configured by tests.
On windows this involves 2 aspects:
Detouring Win32 API functions and redirecting the registry.
The `Detours` library is used to easily capture Win32 API calls.
And the registry uses `RegOverridePredefKey` to redirect the registry
entries the loader accesses.
On linux this only involves intercepting 3 functions; `opendir`,
`access`, and `fopen`. This allows the framework to tell the loader
what to actuall open/access/fopen. These interceptions call the
underlying function but with altered arguments, specifically to
paths the tests set up.
Change-Id: I3531a1cb190c489ffd9f1f0549d0ebcacb3818c5
The TestICD is a configurable ICD which can recreate much of the
behavior the loader expects of an ICD. Combined with a direct line
of communication between the tests and TestICD, tests can setup
specific conditions that have a known response from the loader,
thus allowing proper regression testing.
Change-Id: I84303f0ddb6011fc1b76dad25fd249abb2da29c9
Create the CMake infrastructure for a testing framework.
`test_util.h/.cpp` contains the core macros, wrappers, and utilities.
framework_config.h.in is the header that other components include
to get the full path to binaries on a system.
Change-Id: I3e24a3ee4ff24da499a3bca63059e3b872d3981c
changes:
* loader/loader.c: cast dxgi_factory to void** type
* tests/loader_validation_tests.cpp: check if __STDC_FORMAT_MACROS is already defined
* tests/test_common.h: check if NOMINMAX is already defined
* tests/test_commogn.h: check _MSC_VER instead of WIN32 before pragma warning directive
Change-Id: I2fd78b760a90c2ac0e6463a60f5593a24ca904b8
Building the tests outside of msvc wouldn't work due to improper setup.
This commit fixes the typos and missing debug/release switches for
google-test.
Change-Id: Ifdc2cdab8236c35ba9e14663fffaa412f40aaa6a
This option should not have been used, as an application that statically
links to the loader is likely to break as a result of driver updates.
Change-Id: I6bc05ac6fac601f439274fd8efeb0cd76564ccd1
This CL adds the enable_testing() cmake call and registers
vk_loader_validation_tests as a test in cmake.
This allows the test to be run when `ctest` is executed.
Change-Id: I57fd579c7625fbf7bbd468a5716e3a68b601c1fd
The `VkDebugUtilsObjectNameInfoEXT` member of the
`VkDebugUtilsMessengerCallbackDataEXT` struct was turned const in Vulkan
header 1.1.95 and modifications were required for compilation
Change-Id: I0e52d821239a2b74c8880864a9522359f2285d72
Note that references in scripts/common_codegen.py and
scripts/loader_extension_generator.py will need to be
removed later
Change-Id: I7b17c80f7a06a339d7df0c199ff556212a7c6534
This is a first pass reorganization of CMake files in this repo.
It consists primarily of dead code/variable removal, simplification,
and reformatting by latest cmake-format.
bump to cmake_minimum_required(3.4) for ccache
simplify excessive use of generator expressions
clarify why CMAKE_OSX_DEPLOYMENT_TARGET is pre-project().
clarify setting Windows install prefix if needed
remove unused DisplayServer variable
remove obsolete argument to endif()
remove unneeded ccache property RULE_LAUNCH_LINK
ccache doesn't affect linking, so the property is meaningless.
remove unneeded CMAKE_VERBOSE_MAKEFILE hardcode.
remove extra CMAKE_MODULE_PATH
remove extra cmake_minimum_required
change PYTHON_CMD to PYTHON_EXECUTABLE
change CMAKE_SYSTEM_NAME to UNIX/APPLE/WIN32
Use consistent platform identification.
Note that UNIX evaluates true for OSX, so whenever the code intends
"Linux only", we use (UNIX AND NOT APPLE).
remove unneeded TARGET_NAMES variable
remove unneeded VK_LAYER_RPATH variable
change 'ln -sf' to 'cmake -E create_symlink'
reorder dependencies for clarity
rearrange order of macro arguments
rename run_vk_xml_generate to GenerateFromVkXml
rename add_vk_layer to AddVkLayer
Borrowing from the Google style guide, use camel-case
to more easily identify locally-defined macros/functions.
remove unneeded WRAP_SRCS variable
remove unneeded TEST_SRCS variable
move check of VulkanRegistry_FOUND
move SCRIPTS_DIR closer to point of use
move include(FindPkgConfig) earlier
move CMAKE_MACOSX_RPATH earlier
move option() eariler
move GenerateFromVkXml invocations earlier
Move invocations to be closer to the definition of the macro.
Minor edits to comments.
move API_NAME earlier
remove unused BUILDTGT_DIR variable
move add_executable() earlier
combine if(WIN32) trees
.cmake-format.py 0.4.1
reformat using cmake-format 0.4.1
Change-Id: Ia251e932dbc9a8f2655201bb12248dea8c940c30
Add .cmake-format.py
Add cmake-format docs to CONTRIBUTING.md
Minor edits to existing files
Due to a bug in cmake-format, use this script to reformat:
for i in CMakeLists.txt external/CMakeLists.txt loader/CMakeLists.txt tests/CMakeLists.txt tests/layers/CMakeLists.txt
do
sed --in-place='' 's/^ *#/#/' $i
cmake-format --in-place $i
done
Change-Id: I8e59c77ae184c88485a97a015ac81d4f71ac4897
Behavior is largely unchanged except that specifying BUILD_TESTS=ON
with googletest not present no longer quietly skips building the tests.
- Make inclusion of external directory unconditional. We may someday
put something there is not related to testing.
- Make default for BUILD_TEST dependent on googletest presence.
- Remove if() around entire contents of tests CMake file.
- Add CMake messaging to clarify googletest activity.
- Throw a CMake error if googletest not present and BUILD_TESTS=ON
- Move the CMake code to copy the loader DLL from the loader target
definition to the test target definition. The test should be
taking responsibility for copying this DLL and it avoids doing the
copy if BUILD_TESTS is on and gtest is not present.
- Use better CMake code to perform the copy.
There are a couple of tests in the loader tests that test behavior
when enabling layers. This changes them to use layers that are present
in this repo, instead of validation layers.
If the repo is built without the loader, cmake will now look for an
SDK installation on Windows. On Linux, it will look in the standard
system paths for a loader.
There used to be functionality to specify a name other than "Vulkan"
for the files, which would allow side by side installations. This
has proven to cause more trouble than it solves, so I'm removing it.
Add a cmake variable to select weather you want a dynamic or a static
loader, rather than building both every time. This avoids the
redundancy of building everything twice.
Put icd and test layer json files in $<CONFIG> directory when using
Xcode generator so layer tests can be executed and debugged from within
Xcode.
Change-Id: I079a89ea065ddeec98ce95766e284220c67b1859
Switch layer/loader tests over to use the submodule version of
gtest instead of the version checked into the tree.
Change-Id: I0d0bad7531ccf1de0248a48cea347471c99e179f
Gtest generates GCC warnings for some signed/unsigned mismatches.
Suppress this for the test output.
Change-Id: Ifa3406610e980b81e091976a062cde6457a71377
Gtest and Xlib each redefine 'None' and 'Bool', which causes
gtest compilation to fail hard. Temporarily clear the definitions
to allow gtest to build using an Xlib display server.
Change-Id: I75e53bbff9266a59ebf53a81c2e148e51de6b7c7
- Add new VUIDs to database and vuid_mapping.py
- Remove deleted VUIDs from database
- Update vuid_mapping.py to disregard KHR/KHX suffix
- Update spec.py json comparison to update more fields from existing
VUIDs and delete entries for removed VUIDs
- Update layers and tests that were pointing to deleted VUIDs to use
replacements
- Revert vuid_mapping.py and run_all_tests.sh workarounds for undefined
private VUIDs
Change-Id: Ie6c5b01237d5917be66a35337e3dbaf42fea3b00
Workarounds for private codegen and tests so they can run without having
to update the VUID mapping or database
Change-Id: Idf71df859f55888103f93f863fc73a0c7a01de2c
- updated vulkan.h
- updated vk.xml
- updated layer json files
- updated vulkan.hpp
- updated validation_error_database.txt
- updated vk_validation_error_messages.h
- updated vuid_mapping.py
Note that the VU text in the database file contains artifacts from
the registry/VUID toolchain. These will be addressed in a follow-on
patch set.
Change-Id: I6994ec17a6edcb6c9028c792c68863cd39f1fc56
This sets up cmake to locate the temporary or worker MSVC projects
into a subfolder called lvl_cmake_targets. This simply unclutters
the Visual Studio Solution Explorer projects pane, and does not
affect functionality.
Change-Id: I6933d05758d6f174a4f66ceaef51d43627210e4f
Tests and test/layers CMakeLists.txt files were missing
this include path variable. This prevents LVL from building when
used as a submodule.
Change-Id: I0746b9ef280ca0bdd75a0a539c5bdc78114a60ba
The tr1 namespace is used by Google Test and has been deprecated
starting with Visual Studio 15.5. Turn off the deprecation warning
until we can update Google Test to prevent the build from failing.
Change-Id: I351170ce015ea7abc18ece4db0a511dae6352bf0
The device layers should list the names of the original layers
enabled during vkCreateInstance. We were expanding the
meta-layers which caused there to be a mismatch in names.
NOTE: that this list still include Implicit and Environment
variable enabled layers since those are techincally enabled at
vkCreateInstance as well.
Change-Id: I3ef88623e96a12a8f18f8f04e95a6f5444f4be56
Update the headers and xml file with the latest spec changes for
Vulkan 1.0.54. Also, make corresponding loader and layer changes
to support the new extensions.
Change-Id: I11273c5e3e828743f904e4f0b4b2f2c3a7804df0
Fixes#1878
If vkvalidatelayerdoc script is not run from a directly two levels
below the layer source, then just skip running it. Print out a message
on how to run doc validation manually for those interested.
Doc validation makes some directory assumptions that are fragile.
Temporarily disabling doc validation from run_all_tests scripts while
I figure out a better solution for how to organize the script and make
sure it can access all the files it needs.
Add doc validator back into Windows run-all-tests script.
Add terse_mode option to win/lin run_all_tests scripts
Change-Id: I4fa02ba5caad374a599c2fed42b8661bdb083a77
This layer allows our tests to set device attributes (currently only
limits) to values more easily tested against in layer validation
tests.
tests: Don't remove leading vk when asking loader for addresses
Change-Id: I3872fa59a202af34d3e791bd6b3b6d995b578c65
tests: profile layer don't include headers that tests already include
Change-Id: I9b1f8d98d1f8ce2d404466ee278a293e1f26f3b6
layers: device_profile API cleanup
tests: Link device_profile_api to layers directory
Change-Id: I2a55a133d8024d60103ab831db341a034530c9d4
tests: Call down GetPhysicalDeviceProcAddr
in device_profile_api layer
Change-Id: I3b08479bc8bd47f55a2cd094a071bc35e63fa0b5
tests: Update json for device_limits_api layer
Change-Id: I8a6fd15fee7f3e3026c15d8a0ff2e82bb6a71c85
tests: Add .def for device_profile_api layer
Change-Id: Ib19af48dcf68b469e169383de7da6c9ac5e1ecce
tests: Change include order to avoid symbol collision
It turns out that including threading.h ahead of vk_layer_dispatch_table.h
causes CreateSemaphore and CreateEvent to be defined as CreateSemaphoreA
and CreateEventA on Windows
Change-Id: Ib3e8a9536a12bb386b11222c1cf5c617ba2871a3
tests: Rename header file
Change-Id: I2291e3e6fba9a7023828857ced0378668bf552f5
tests: Only save properties in maps
Change-Id: Id1161b7230dc610dfb8b9084dcbbf0022ca5e199
tests: More device profile api layer cleanup
Change-Id: I5df021f1284e8a90d1dc3c0071354c65e2a36539
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- build new verison of vulkan.hpp
- code fixups for deprecated DebugReportError enum
Note that this does NOT include any shader-checker support for the
VK_AMD_texture_gather_bias_lod extension, as this requires glslang
and SPIR-V updates.
Change-Id: Ie01aed143f2fad065c86e2a27e46fe32ccb9e1f7
Fix how the loader handles realloc calls. Instead of always overriding
the pointer, check to see if the allocation succeeds.
Also, set the paths in our run_all_tests.ps1 to global paths.
Finally, fix a spelling error in the test names.
Change-Id: I7b2e0d246dbe6353d29fb56367397c5d8767aaa2
Fix a few validation errors in the loader test which showed up
when validation is enabled.
Thanks to Tony for catching these.
NOTE: If you have an Nvidia and Intel in the system and Optimus
is enabled, you will get errors during the vkEnumerateDeviceGroupsKHX
test which appear to be because of the way Optimus is calling down
with a non-NULL invalid structure for the groups structure.
Change-Id: I808ca01c719a28f55ef3581647f598a4bdd9d18e
In C++, you need to define __STDC_FORMAT_MACROS prior to including
'inttypes.h' in order for it to properly expose PRIxLEAST64.
For some reason, many platforms expose this anyways without the
define, but some dont.
Change-Id: I1f6b6401540c1b84d95525cbe1ebc649f6f2d393
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- fixed include/vulkan/vulkan.hpp -- see Note
Note: The Vulkan.hpp generator asserted when processing the 1.0.46 header
files. Added a temporary workaround for this issue, but it may affect
use of the vulkan.hpp header file.
Change-Id: Iab296bf2004fbf6099baaab148994b15b0392381
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- updated include/vulkan/vulkan.hpp
- FIXED scripts/vk.xml (see note)
NOTE:
This commit also includes an unofficial change to vk.xml. The 1.0.45
header update broke the structure definition for device_features2. The
mangled line has been replaced in this update.
Change-Id: If646355a5b211ca90484d449a1c55412decc3de6
The loader test build needed the appropriate #include defined
for more than just Windows platforms.
Change-Id: I434ba15586915cab4ce3784ca19a6a6f8f1f129a
Add loader tests to evaluate the results returned by the new
vkEnumeratePhysicalDeviceGroupsKHX extension.
Change-Id: Ia5cf10d283be015080d48bb9e9bc4e84bf3b45b9
Add more tests to the loader test which validates intentionally
failing during vkCreateInstance and/or vkCreateDevice. Originally,
we have relied on the CTS tests to catch these issues, but it
makes it more available for general testing if the loader tests do
it as well.
Change-Id: I9043b1c8c0456996954d20e30acf1e2ab3bdd31b
In Visual Studio builds, the gtest.dll and gtest-main.dll files
are now copied into the tests build output directory.
Change-Id: Ifc727ef3c4ab26ed58471136b564f4e7a73b303a
On some platforms, the old ASSERT used in one of the tests caused
a compilation error. This change resolves that error.
Change-Id: I73c97ab76e596fcc2f35e855f31df4fefe095217
Loader test failed on multigpu because it carried a previous failure
value on next iteration before replacing it.
Change-Id: Id67990f37136d89189c832f4b1efc82d6d8a965e
Updated all necessary files to 1.0.42. This includes the various
headers as well as the loader, and the parameter validation, object
tracking, and threading layers. Additionally, bump all layer JSON
files to 1.0.42.
Also, in this change:
- Enable loader extension automation so that the loader now
generates all extension entry-points automatically during build
to reduce likelihood of missing a critical piece on header
update.
- Enable layer dispatch table extension automation for the same
reason.
- Fixes from Mark Lobodzinski and Tony Barbour to resolve crash
in loader when working with Intel's Windows driver due to
GetInstanceProcAddr getting called on inappropriate command
names.
Change-Id: Ic18d3fac2e145c386c0192031deb5089c91a00d8
Added a loader test to catch the case where the user just calls
vkEnumeratePhysicalDevices with the full count and array passed
in without previously querying the count. Also, verified that
the count returned with that call matches the count returned by
the standard call. Finally, added a check for the VK_INCOMPLETE
return value when not enough physical devices are indicated on
a second call.
Change-Id: Ic14a109ca59dcba3ea298ec3c0092403026e9b0c
Add new extensions for 1.0.39. Also, updated layers to include
minimal set of functionality for 1.0.39 extensions. Extensions include:
- VK_KHR_get_physical_device_properties2
- VK_KHR_shader_draw_parameters
- VK_EXT_direct_mode_display
- VK_EXT_display_surface_counter
- VK_EXT_display_control
Also, redo the LoaderAndLayerIf document.
Change-Id: I10412086da7a798afe832a3892e18f606259b5af
We had several copies of this macro across the repos -- moved it to
the top-level cmake file for sharing.
Change-Id: I33a97ecb24ad8c7cc6826c1a431f668fa2bec41f
By default, clang-format will sort header files which often breaks
compilation. Added an option to the main, tests, and layers versions
of these files to disable header reordering.
Change-Id: Ic0cc5727b83d14d5f3962f3ecff7b6bf5e4c5fb9
- Set SCRIPTS_DIR in root CMakeLists.txt
- Update android-generate.bat and android-generate.sh
- Updated layer/loader/tests CMakeLists.txt files for new path
- Updated test layer doc scripts for new location
Change-Id: I2d519ec40883ebeec4e9daab8641ad65515bb08c
Fail from run_loader_tests.sh if run_wrap_objects_tests.sh fails.
Don't run tests in parallel to avoid hangs on some devices.
Filter out new "Unexpected:" lines from vk_layer_validation_tests.
Those lines include varying details that never pass a diff.
This test requires files outside of the build directory, which
doesn't work when distributing build results. It will soon be
superseded by a new test for valid enums. It is still covered
by Linux run_all_tests.sh
Add quotes around shell var expansions in the update_external_sources scripts.
For Windows, remove the cmake directives to add a linker option for the DEF
files. These were redundant with the DEF files getting added via the
cmake add_library() directive. They were also causing difficult-to-fix
problems with paths that have spaces in them.
Change-Id: I741bac31bbf27deae59031b6aa916c6ab48383a6
Layer tests broke with a previous commit to fix CXX
flags inheritance. This commit repairs the problem.
Change-Id: Id54cfb737f32b6f11a4146225cc22e0b155ba2ba
Some sub-projects were overwriting CMAKE_CXX_FLAGS instead of
inheriting from the parent. This keeps any user settings outside
or above the top CMakeLists.txt file from reaching these sub-projects.
These fixes include preserving the inheritance, adding extra flags
to turn off warnings (mostly in autogen code) because the top
level turns on Wall, and trivial code fixes to avoid the need to
add a setting to turn off a warning for those trivial fixes.
These changes should have no impact on Windows.
Change-Id: I0c3c175cb5058f26a259ee3f4fde9fdaf3e6b00d
Move the GIPA setup of the dispatch tables for layers into
the layer_init_device_dispatch_table call since we're already
doing a majority of it there. This removes the need to separately
setup the WSI extension entry-points.
Additionally, memset the table to 0, just to make sure anything
that gets added in the future is obvoiusly not set.
Change-Id: I63c7c107cd9f7957e2766fdbeb8a06bc1ae0eda6
Fix undefined variable issue in the Wayland/Mir
presentation support query functions where 'inst'
needs to be 'phys_dev->inst'
Change-Id: I8fe874acdd66e9a650029ad4f239596f5ae76df7
LX535 / MI-76
For backwards compatibility, a device-layer list may still be passed to vkCreateDevice, but must be ignored, and not trigger any errors.
Change-Id: I00000000000000decaf15bad0000000000000076
Fix a recent change broke windows builds that don't use the VC IDE or
decorate build trees like VC does
Change-Id: I93c8a559c4255408a6fa890b2a3e4d81822d1cea
Use -TestExceptions to filter out tests with known problems.
Test list should follow a space, separated by a colon, i.e.
powershell -command .\run_all_tests.ps1 -TestExceptions ^
VkLayerTest.RequiredParameter:^
VkLayerTest.UnrecognizedValue
The new VkWsiEnabledLayerTest.TestEnabledWsi test is a start at testing many of
the errors in the swapchain layer, when the WSI extensions are enabled. More
work is needed, with code comments stating some of the obvious work that's
needed. In addition, the only platform currently supported is Linux/XCB.
- CMake was configured to copy _run_all_tests.ps1 to
_vkvalidatelayerdoc.ps1, resulting in _run_all_tests.ps1
effectively calling itself in an infinte loop.
- Drop the _ prefix from the _run_all_tests.ps1 and
_vkvalidatelayerdoc.ps1 when copying to build.
Change-Id: I4c682bebe786ef0f2f66ce2eeb9e8174eea83e6f
Rename utils lib to VkLayer_utils to use same namespace as
the layers.
The previous Windows CMake code attempted to build both
dynamic and static utils libs, succeeding with only the static.
Change the CMake code to only attempt to build the static lib.
Replace the hardcoded glslang and spirv-tools path with
CMake find macros to find the include, library, and programs.
Change-Id: Id498ad75d663f2795207b39b40a11ddfe2c03920
cube & tri --validate now use core_validation instead of MT & DS
Very little efficiency has been pulled out for this initial merge.
A few maps have been merged, but otherwise almost all of the mem_tracker
code is pulled intact and surrounded in "#if MTMERGE" blocks.
Change-Id: Icf060bfc0177fc8c9fa7d8d57f7ddc446357b665
This layer should sit at the BOTTOM of the layer stack (closest to the driver, furthest from the app). It interecpts all created non-dispatchable-objects and wraps them in a struct, returning that struct ptr up the chain.
For all API calls that use NDOs, this layer will unwrap them, and overwrite the wrapped handle with the actual handle before passing it down. Then, after calling down to the driver, the layer will re-overwrite the NDO handles with the original, wrapped handle.
When an NDO object is destroyed, the actual handle is passed down, then the wrap struct object is destroyed.
Renamed layers from (for example) xxx_DrawState to xxx_draw_state
Renamed JSON files
Renamed libraries
Renamed object_track.* to object_tracker.*
Renamed apidump.h to api_dump.h
Renamed screen_shot layer to screenshot
Renamed APIDump layer settings file options to ApiDump
Bug fixes here and there from prior renames
This is the initial "dumb" merge where a few data structures are now duplicated
within DrawState. This is intentional to simplify the transition and a follow-on
commit will fix these inefficiencies.
Conflicts:
layers/draw_state.cpp