Browse Source

Vk: rename *IndexTypeUintXY to IndexTypeUnsignedFoo for consistency.

It would be weird if we had MeshIndexType::UnsignedByte but
DeviceFeature::IndexTypeUint8.
pull/495/head
Vladimír Vondruš 5 years ago
parent
commit
d9d8c41980
  1. 4
      doc/snippets/MagnumVk.cpp
  2. 8
      src/Magnum/Vk/DeviceFeatures.h
  3. 4
      src/Magnum/Vk/Implementation/deviceFeatureMapping.hpp
  4. 8
      src/Magnum/Vk/Test/DeviceFeaturesTest.cpp

4
doc/snippets/MagnumVk.cpp

@ -348,7 +348,7 @@ using namespace Containers::Literals;
Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_IGNORE(properties)} Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_IGNORE(properties)}
DOXYGEN_IGNORE() DOXYGEN_IGNORE()
.setEnabledFeatures( .setEnabledFeatures(
Vk::DeviceFeature::IndexTypeUint8| Vk::DeviceFeature::IndexTypeUnsignedByte|
Vk::DeviceFeature::SamplerAnisotropy| Vk::DeviceFeature::SamplerAnisotropy|
Vk::DeviceFeature::GeometryShader| Vk::DeviceFeature::GeometryShader|
DOXYGEN_IGNORE(Vk::DeviceFeature{})) DOXYGEN_IGNORE(Vk::DeviceFeature{}))
@ -370,7 +370,7 @@ if(extensions.isSupported("VK_NV_mesh_shader"_s))
info.addEnabledExtensions({"VK_NV_mesh_shader"_s}); info.addEnabledExtensions({"VK_NV_mesh_shader"_s});
DOXYGEN_IGNORE() DOXYGEN_IGNORE()
info.setEnabledFeatures(properties.features() & // mask away unsupported ones info.setEnabledFeatures(properties.features() & // mask away unsupported ones
(Vk::DeviceFeature::IndexTypeUint8| (Vk::DeviceFeature::IndexTypeUnsignedByte|
Vk::DeviceFeature::SamplerAnisotropy| Vk::DeviceFeature::SamplerAnisotropy|
Vk::DeviceFeature::GeometryShader| Vk::DeviceFeature::GeometryShader|
DOXYGEN_IGNORE(Vk::DeviceFeature{}))); DOXYGEN_IGNORE(Vk::DeviceFeature{})));

8
src/Magnum/Vk/DeviceFeatures.h

@ -71,10 +71,10 @@ enum class DeviceFeature: UnsignedShort {
/** /**
* Whether the full 32-bit range is supported for indexed draw calls when * Whether the full 32-bit range is supported for indexed draw calls when
* using @val_vk{INDEX_TYPE_UINT32,IndexType}. * using @val_vk{INDEX_TYPE_UINT32,IndexType}.
* @see @ref DeviceFeature::IndexTypeUint8 * @see @ref DeviceFeature::IndexTypeUnsignedByte
* @todo expose the `maxDrawIndexedIndexValue` limit * @todo expose the `maxDrawIndexedIndexValue` limit
*/ */
FullDrawIndexUint32, FullDrawIndexUnsignedInt,
/** /**
* Whether image views with @val_vk{IMAGE_VIEW_TYPE_CUBE_ARRAY,ImageViewType} * Whether image views with @val_vk{IMAGE_VIEW_TYPE_CUBE_ARRAY,ImageViewType}
@ -1271,10 +1271,10 @@ enum class DeviceFeature: UnsignedShort {
/** /**
* Whether an 8-bit type can be used in index buffers. * Whether an 8-bit type can be used in index buffers.
* @see @ref DeviceFeature::FullDrawIndexUint32 * @see @ref DeviceFeature::FullDrawIndexUnsignedInt
* @requires_vk_extension Extension @vk_extension{EXT,index_type_uint8} * @requires_vk_extension Extension @vk_extension{EXT,index_type_uint8}
*/ */
IndexTypeUint8, IndexTypeUnsignedByte,
/* VkPhysicalDeviceExtendedDynamicStateFeaturesEXT, #268 */ /* VkPhysicalDeviceExtendedDynamicStateFeaturesEXT, #268 */

4
src/Magnum/Vk/Implementation/deviceFeatureMapping.hpp

@ -36,7 +36,7 @@
*/ */
#ifdef _c #ifdef _c
_c(RobustBufferAccess, robustBufferAccess) _c(RobustBufferAccess, robustBufferAccess)
_c(FullDrawIndexUint32, fullDrawIndexUint32) _c(FullDrawIndexUnsignedInt, fullDrawIndexUint32)
_c(ImageCubeArray, imageCubeArray) _c(ImageCubeArray, imageCubeArray)
_c(IndependentBlend, independentBlend) _c(IndependentBlend, independentBlend)
_c(GeometryShader, geometryShader) _c(GeometryShader, geometryShader)
@ -213,7 +213,7 @@ _ce(BufferDeviceAddressMultiDevice, bufferDeviceAddressMultiDevice)
_cext(HostQueryReset, hostQueryReset, hostQueryReset, EXT::host_query_reset) _cext(HostQueryReset, hostQueryReset, hostQueryReset, EXT::host_query_reset)
_cext(IndexTypeUint8, indexTypeUint8, indexTypeUint8, EXT::index_type_uint8) _cext(IndexTypeUnsignedByte, indexTypeUint8, indexTypeUint8, EXT::index_type_uint8)
_cext(ExtendedDynamicState, extendedDynamicState, extendedDynamicState, EXT::extended_dynamic_state) _cext(ExtendedDynamicState, extendedDynamicState, extendedDynamicState, EXT::extended_dynamic_state)

8
src/Magnum/Vk/Test/DeviceFeaturesTest.cpp

@ -95,14 +95,14 @@ void DeviceFeaturesTest::mapping() {
void DeviceFeaturesTest::debugFeature() { void DeviceFeaturesTest::debugFeature() {
std::ostringstream out; std::ostringstream out;
Debug{&out} << DeviceFeature::FullDrawIndexUint32 << DeviceFeature::VulkanMemoryModel << DeviceFeature(0xab); Debug{&out} << DeviceFeature::FullDrawIndexUnsignedInt << DeviceFeature::VulkanMemoryModel << DeviceFeature(0xab);
CORRADE_COMPARE(out.str(), "Vk::DeviceFeature::FullDrawIndexUint32 Vk::DeviceFeature::VulkanMemoryModel Vk::DeviceFeature(0xab)\n"); CORRADE_COMPARE(out.str(), "Vk::DeviceFeature::FullDrawIndexUnsignedInt Vk::DeviceFeature::VulkanMemoryModel Vk::DeviceFeature(0xab)\n");
} }
void DeviceFeaturesTest::debugFeatures() { void DeviceFeaturesTest::debugFeatures() {
std::ostringstream out; std::ostringstream out;
Debug{&out} << (DeviceFeature::FullDrawIndexUint32|DeviceFeature::VulkanMemoryModel|DeviceFeature(0xab)|DeviceFeature(0xcc)) << DeviceFeatures{}; Debug{&out} << (DeviceFeature::FullDrawIndexUnsignedInt|DeviceFeature::VulkanMemoryModel|DeviceFeature(0xab)|DeviceFeature(0xcc)) << DeviceFeatures{};
CORRADE_COMPARE(out.str(), "Vk::DeviceFeature::FullDrawIndexUint32|Vk::DeviceFeature::VulkanMemoryModel|Vk::DeviceFeature(0xab)|Vk::DeviceFeature(0xcc) Vk::DeviceFeatures{}\n"); CORRADE_COMPARE(out.str(), "Vk::DeviceFeature::FullDrawIndexUnsignedInt|Vk::DeviceFeature::VulkanMemoryModel|Vk::DeviceFeature(0xab)|Vk::DeviceFeature(0xcc) Vk::DeviceFeatures{}\n");
} }
}}}} }}}}

Loading…
Cancel
Save