Skip to content

Fix lots of examples warnings #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a9f67b9
cmake: update version to clean deprecation warning
Alucowie Jun 16, 2024
4d2d5ce
Fixes the compiler reorder warnings
Alucowie Jun 17, 2024
e5b51cb
Fixes compiler unknown-pragmas warnings
Alucowie Jun 17, 2024
0c67b01
fix cmake warning about name mismatch
Alucowie Jul 4, 2024
0856ad1
ogles: fix return value warning
Alucowie Jul 4, 2024
c23f6a2
Vulkan: Fixes the compiler reorder warnings
Alucowie Jul 4, 2024
afb4dcd
Vulkan: fixes sign-compare warnings
Alucowie Jul 4, 2024
3b98f73
Vulkan: fixes unused variable warnings
Alucowie Jul 4, 2024
63c06ce
Vulkan: fix unused-but-set-variable warning on deviceFeatures variable
Alucowie Jul 5, 2024
9ffd133
Vulkan: fix sign-compare warning
Alucowie Jul 5, 2024
a4a814b
Vulkan: fix compiler >=g++-8 class-memaccess warnings
Alucowie Jul 5, 2024
10a661d
Vulkan: another round of sign-compare fixes
Alucowie Jul 5, 2024
ced439e
Vulkan: fix compiler switch warning
Alucowie Jul 5, 2024
fbff372
Vulkan: fix invalid-offsetof warnings
Alucowie Jul 5, 2024
3e24895
Vulkan: fix unused-but-set-variable warning
Alucowie Jul 5, 2024
0d7575f
Vulkan: fix compiler catch-value warnings
Alucowie Jul 6, 2024
6901ed1
framework: add getUintOption to avoid sign-compare warnings
Alucowie Jul 5, 2024
ab29ab4
framework: use reference type to prevent copying
Alucowie Jul 6, 2024
382d16a
framework: move internal variables to source file
Alucowie Jul 6, 2024
f9bb324
framework: fix stringop-overread and class-memaccess warnings
Alucowie Jul 6, 2024
24af26c
framework: fix unused function warnings
Alucowie Jul 6, 2024
dfaa431
framework: Don't trust hardcoded array size
Alucowie Jul 8, 2024
fcab9c8
framework: fix memcpy class-memaccess warnings
Alucowie Jul 8, 2024
6c32edf
Vulkan: fix cast-user-defined warnings
Alucowie Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmake/modules/FindWayland.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ IF (NOT WIN32)

include(FindPackageHandleStandardArgs)

set(FPHSA_NAME_MISMATCHED TRUE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CLIENT DEFAULT_MSG WAYLAND_CLIENT_LIBRARIES WAYLAND_CLIENT_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_SERVER DEFAULT_MSG WAYLAND_SERVER_LIBRARIES WAYLAND_SERVER_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_EGL DEFAULT_MSG WAYLAND_EGL_LIBRARIES WAYLAND_EGL_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CURSOR DEFAULT_MSG WAYLAND_CURSOR_LIBRARIES WAYLAND_CURSOR_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIR)
unset(FPHSA_NAME_MISMATCHED)

MARK_AS_ADVANCED(
WAYLAND_INCLUDE_DIR WAYLAND_LIBRARIES
Expand All @@ -63,4 +65,4 @@ IF (NOT WIN32)
WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES
)

ENDIF ()
ENDIF ()
4 changes: 2 additions & 2 deletions cmake/modules/FindX11_XCB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
find_package(PkgConfig)

if(NOT X11_XCB_FIND_COMPONENTS)
set(X11_XCB_FIND_COMPONENTS X11-xcb)
set(X11_XCB_FIND_COMPONENTS X11_XCB)
endif()

include(FindPackageHandleStandardArgs)
Expand Down Expand Up @@ -37,4 +37,4 @@ foreach(comp ${X11_XCB_FIND_COMPONENTS})
if(NOT ${comp}_FOUND)
set(X11_XCB_FOUND false)
endif()
endforeach()
endforeach()
4 changes: 2 additions & 2 deletions cmake/modules/FindXCB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
find_package(PkgConfig)

if(NOT XCB_FIND_COMPONENTS)
set(XCB_FIND_COMPONENTS xcb)
set(XCB_FIND_COMPONENTS XCB)
endif()

include(FindPackageHandleStandardArgs)
Expand Down Expand Up @@ -50,4 +50,4 @@ endforeach()

if(XCB_INCLUDE_DIRS)
list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS)
endif()
endif()
2 changes: 1 addition & 1 deletion cmake/utilities/assets.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)

set(SDK_ROOT_INTERNAL_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. CACHE INTERNAL "")

Expand Down
2 changes: 1 addition & 1 deletion cmake/utilities/compile_options.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)

# Apply various compile/link time options to the specified example target
function(apply_example_compile_options_to_target THETARGET)
Expand Down
2 changes: 1 addition & 1 deletion cmake/utilities/executable.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)

# Adds the correct executable file (Windows MSVS/MinGW, Linux, MacOS, iOS or libary(Android)
# Optional parameters:
Expand Down
2 changes: 1 addition & 1 deletion cmake/utilities/spirv.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)

# Adds a shader that should be compiled to spirv.
# Will create a rule that, at build time, will compile the provided shaders from at BASE_PATH/RELATIVE_PATH into spirv at ASSET_FOLDER/RELATIVE_PATH.
Expand Down
2 changes: 1 addition & 1 deletion cmake/utilities/submodules.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)

# Searches the SUBMODULE_PATH paramater to make sure the directory exists first.
# External dependencies are managed by a SUBMODULE_PATH/CMakeLists.txt with the
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenCL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenCLExamples)

set(OPENCL_EXAMPLES
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenCL/MatrixMultiplication/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenCLMatrixMultiplication)
if(IOS)
message("Skipping OpenCLMatrixMultiplication : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/01_HelloAPI/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESHelloAPI)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Expand Down
2 changes: 2 additions & 0 deletions examples/OpenGLES/01_HelloAPI/OpenGLESHelloAPI_LinuxXCB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ bool createNativeWindow(xcb_connection_t* nativeConnection, xcb_screen_t* native

xcb_map_window(nativeConnection, nativeWindow);
xcb_flush(nativeConnection);

return true;
}

/*!*********************************************************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/02_IntroducingPVRShell/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESIntroducingPVRShell)

add_subdirectory(../../.. ${CMAKE_CURRENT_BINARY_DIR}/sdk)
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/03_IntroducingPVRUtils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESIntroducingPVRUtils)

add_subdirectory(../../.. ${CMAKE_CURRENT_BINARY_DIR}/sdk)
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/04_IntroducingUIRenderer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESIntroducingUIRenderer)

add_subdirectory(../../.. ${CMAKE_CURRENT_BINARY_DIR}/sdk)
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/05_IntroducingPVRCamera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESIntroducingPVRCamera)

add_subdirectory(../../.. ${CMAKE_CURRENT_BINARY_DIR}/sdk)
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/AntiAliasing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESAntiAliasing)
if(IOS)
message("Skipping OpenGLESAntiAliasing : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/BinaryShaders/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESBinaryShaders)

add_subdirectory(../../.. ${CMAKE_CURRENT_BINARY_DIR}/sdk)
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/Bumpmap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESBumpmap)
if(IOS)
message("Skipping OpenGLESBumpmap : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESExamples)

if (PVR_BUILD_OPENGLES2_EXAMPLES)
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/DeferredShading/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESDeferredShading)
if(IOS)
message("Skipping OpenGLESDeferredShading : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/GameOfLife/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESGameOfLife)
if(IOS)
message("Skipping OpenGLESGameOfLife : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/GaussianBlur/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESGaussianBlur)
if(IOS)
message("Skipping OpenGLESGaussianBlur : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/IMGFramebufferDownsample/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESIMGFramebufferDownsample)
if(IOS)
message("Skipping OpenGLESIMGFramebufferDownsample : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/IMGTextureFilterCubic/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESIMGTextureFilterCubic)
if(IOS)
message("Skipping OpenGLESIMGTextureFilterCubic : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/ImageBasedLighting/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESImageBasedLighting)
if(IOS)
message("Skipping OpenGLESImageBasedLighting : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/Multithreading/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESMultithreading)
if(IOS)
message("Skipping OpenGLESMultithreading : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/MultiviewVR/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESMultiviewVR)
if(IOS)
message("Skipping OpenGLESMultiviewVR : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/OpenCLExample/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESOpenCLExample)
if(ANDROID)
message("Skipping OpenGLESOpenCLExample : Not supported on Android")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/PVRScopeExample/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESPVRScopeExample)
if(IOS)
message("Skipping OpenGLESPVRScopeExample : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/PVRScopeRemote/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESPVRScopeRemote)
if(IOS)
message("Skipping OpenGLESPVRScopeRemote : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/ParticleSystem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESParticleSystem)
if(IOS)
message("Skipping OpenGLESParticleSystem : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/PostProcessing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESPostProcessing)
if(IOS)
message("Skipping OpenGLESPostProcessing : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/Shadows/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESShadows)
if(IOS)
message("Skipping OpenGLESShadows : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenGLES/Skinning/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(OpenGLESSkinning)
if(IOS)
message("Skipping OpenGLESSkinning : Not supported on iOS")
Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/01_HelloAPI/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanHelloAPI)

if(IOS)
Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/02_IntroducingPVRShell/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanIntroducingPVRShell)
if(IOS)
message ("Skipping VulkanIntroducingPVRShell : Vulkan is not supported on iOS.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,22 +623,17 @@ class VulkanIntroducingPVRShell : public pvr::Shell

/// <summary>Default constructor for VulkanIntroducingPVRShell used to initialise the variables used throughout the demo.</summary>
VulkanIntroducingPVRShell()
: // Vulkan resource handles
_instance(VK_NULL_HANDLE), _physicalDevice(VK_NULL_HANDLE), _surface(VK_NULL_HANDLE), _swapchain(VK_NULL_HANDLE), _device(VK_NULL_HANDLE), _vbo(VK_NULL_HANDLE),
_vboMemory(VK_NULL_HANDLE), _modelViewProjectionMemory(VK_NULL_HANDLE), _modelViewProjectionBuffer(VK_NULL_HANDLE), _descriptorPool(VK_NULL_HANDLE),
_renderPass(VK_NULL_HANDLE), _queue(VK_NULL_HANDLE), _pipelineLayout(VK_NULL_HANDLE), _graphicsPipeline(VK_NULL_HANDLE), _commandPool(VK_NULL_HANDLE),
_pipelineCache(VK_NULL_HANDLE), _staticDescriptorSetLayout(VK_NULL_HANDLE), _dynamicDescriptorSetLayout(VK_NULL_HANDLE), _staticDescriptorSet(VK_NULL_HANDLE),
_dynamicDescriptorSet(VK_NULL_HANDLE), _triangleImage(VK_NULL_HANDLE), _triangleImageView(VK_NULL_HANDLE), _triangleImageMemory(VK_NULL_HANDLE),
_bilinearSampler(VK_NULL_HANDLE), _vertexShaderModule(VK_NULL_HANDLE), _fragmentShaderModule(VK_NULL_HANDLE),

// initialise variables used for animation
_modelMatrix(glm::mat4(1)), _viewProjectionMatrix(glm::mat4(1)), _rotationAngle(45.0f),

// initialise the other variables used throughout the demo
_enabledInstanceExtensionNames(0), _enabledLayerNames(0), _enabledDeviceExtensionNames(0), _physicalDeviceMemoryProperties(), _physicalDeviceProperties(),
_currentFrameIndex(0), _swapchainLength(0), _swapchainColorFormat(VK_FORMAT_UNDEFINED), _depthStencilFormat(VK_FORMAT_UNDEFINED),
_triangleImageFormat(VK_FORMAT_UNDEFINED), _swapchainIndex(-1), _viewport(), _scissor(), _vboStride(-1), _graphicsQueueFamilyIndex(-1), _modelViewProjectionBufferSize(-1),
_dynamicBufferAlignedSize(-1), _textureDimensions(), _textureData(0), _numDebugCallbacks(2), _modelViewProjectionMappedMemory(0)
: _instance(VK_NULL_HANDLE), _enabledInstanceExtensionNames(0), _enabledLayerNames(0), _physicalDevice(VK_NULL_HANDLE), _physicalDeviceMemoryProperties(),
_physicalDeviceProperties(), _surface(VK_NULL_HANDLE), _swapchain(VK_NULL_HANDLE), _swapchainLength(0), _swapchainColorFormat(VK_FORMAT_UNDEFINED),
_device(VK_NULL_HANDLE), _enabledDeviceExtensionNames(0), _vbo(VK_NULL_HANDLE), _vboMemory(VK_NULL_HANDLE), _modelViewProjectionBuffer(VK_NULL_HANDLE),
_modelViewProjectionMemory(VK_NULL_HANDLE), _modelViewProjectionMappedMemory(0), _modelViewProjectionBufferSize(-1), _descriptorPool(VK_NULL_HANDLE),
_staticDescriptorSetLayout(VK_NULL_HANDLE), _dynamicDescriptorSetLayout(VK_NULL_HANDLE), _staticDescriptorSet(VK_NULL_HANDLE), _dynamicDescriptorSet(VK_NULL_HANDLE),
_renderPass(VK_NULL_HANDLE), _depthStencilFormat(VK_FORMAT_UNDEFINED), _queue(VK_NULL_HANDLE), _triangleImage(VK_NULL_HANDLE), _triangleImageView(VK_NULL_HANDLE),
_triangleImageFormat(VK_FORMAT_UNDEFINED), _triangleImageMemory(VK_NULL_HANDLE), _bilinearSampler(VK_NULL_HANDLE), _commandPool(VK_NULL_HANDLE),
_pipelineLayout(VK_NULL_HANDLE), _graphicsPipeline(VK_NULL_HANDLE), _pipelineCache(VK_NULL_HANDLE), _vertexShaderModule(VK_NULL_HANDLE),
_fragmentShaderModule(VK_NULL_HANDLE), _currentFrameIndex(0), _swapchainIndex(-1), _graphicsQueueFamilyIndex(-1), _dynamicBufferAlignedSize(-1),
_modelMatrix(glm::mat4(1)), _viewProjectionMatrix(glm::mat4(1)), _rotationAngle(45.0f), _viewport(), _scissor(), _vboStride(-1), _textureDimensions(),
_textureData(0), _numDebugCallbacks(2)
{
for (uint32_t i = 0; i < _swapchainLength; ++i)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/03_IntroducingPVRVk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanIntroducingPVRVk)
if(IOS)
message ("Skipping VulkanIntroducingPVRVk : Vulkan is not supported on iOS.")
Expand Down
18 changes: 9 additions & 9 deletions examples/Vulkan/03_IntroducingPVRVk/VulkanIntroducingPVRVk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,27 +465,27 @@ class VulkanIntroducingPVRVk : public pvr::Shell
// A convenient way to store the Vulkan resources so that they can be initialised and freed automatically
std::unique_ptr<DeviceResources> _deviceResources;

// Per frame indices used for synchronisation.
uint32_t _currentFrameIndex;

// The index into the set of supported queue families which supports both graphics and presentation capabilities.
uint32_t _graphicsQueueFamilyIndex;

// The aligned size for the dynamic buffers taking into account the minUniformBufferOffsetAlignment member of the limits for the pvrvk::PhysicalDeviceProperties structure.
uint32_t _dynamicBufferAlignedSize;

// Matrices used for animation.
glm::mat4 _modelMatrix;
glm::mat4 _viewProjectionMatrix;
float _rotationAngle;

// Per frame indices used for synchronisation.
uint32_t _currentFrameIndex;

// The viewport and scissors used for rendering handling the portions of the surface written to.
pvrvk::Viewport _viewport;
pvrvk::Rect2D _scissor;

// The index into the set of supported queue families which supports both graphics and presentation capabilities.
uint32_t _graphicsQueueFamilyIndex;

// The size of a single vertex corresponding to the stride of a vertex.
uint32_t _vboStride;

// The aligned size for the dynamic buffers taking into account the minUniformBufferOffsetAlignment member of the limits for the pvrvk::PhysicalDeviceProperties structure.
uint32_t _dynamicBufferAlignedSize;

// The size and data included in the triangle texture.
pvrvk::Extent2D _textureDimensions;
std::vector<uint8_t> _textureData;
Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/04_IntroducingPVRUtils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanIntroducingPVRUtils)
if(IOS)
message ("Skipping VulkanIntroducingPVRUtils : Vulkan is not supported on iOS.")
Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/05_IntroducingUIRenderer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanIntroducingUIRenderer)
if(IOS)
message ("Skipping VulkanIntroducingUIRenderer : Vulkan is not supported on iOS.")
Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/AmbientOcclusion/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanAmbientOcclusion)
if(IOS)
message ("Skipping VulkanAmbientOcclusion : Vulkan is not supported on iOS.")
Expand Down
4 changes: 2 additions & 2 deletions examples/Vulkan/AntiAliasing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanAntiAliasing)
if(IOS)
message ("Skipping VulkanAntiAliasing : Vulkan is not supported on iOS.")
Expand Down Expand Up @@ -67,4 +67,4 @@ apply_example_compile_options_to_target(VulkanAntiAliasing)
target_link_libraries(VulkanAntiAliasing PUBLIC
PVRShell
PVRUtilsVk
)
)
4 changes: 2 additions & 2 deletions examples/Vulkan/AntiAliasing/VulkanAntiAliasing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ void VulkanAntiAliasing::createImagesAndFramebuffers()
pvrvk::ImageCreateInfo taaHistoryColorImageInfo = pvrvk::ImageCreateInfo(pvrvk::ImageType::e_2D, _deviceResources->swapchain->getImageFormat(),
pvrvk::Extent3D(getWidth(), getHeight(), 1u), pvrvk::ImageUsageFlags::e_SAMPLED_BIT | pvrvk::ImageUsageFlags::e_TRANSFER_DST_BIT);

for (int i = 0; i < _swapchainLength; ++i)
for (uint32_t i = 0; i < _swapchainLength; ++i)
{
// Build color and depth attachment image and image views for the offscreen pass of FXAA (1 sample per pixel)
pvrvk::Image colorImage1SPP = pvr::utils::createImage(_deviceResources->device, colorImageInfo1SPP, pvrvk::MemoryPropertyFlags::e_DEVICE_LOCAL_BIT,
Expand Down Expand Up @@ -983,7 +983,7 @@ void VulkanAntiAliasing::changeTAAHistoryImageLayout(pvrvk::CommandBuffer utilit
imageBarrier.setSubresourceRange(pvrvk::ImageSubresourceRange(pvrvk::ImageAspectFlags::e_COLOR_BIT));

// TAA update history render pass
for (int i = 0; i < _swapchainLength; i++)
for (uint32_t i = 0; i < _swapchainLength; i++)
{
imageBarrier.setImage(_deviceResources->taaHistoryImage[i]);
barrier.addBarrier(imageBarrier);
Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/Bumpmap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanBumpmap)
if(IOS)
message ("Skipping VulkanBumpmap : Vulkan is not supported on iOS.")
Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.10)
project(VulkanExamples)

set(VULKAN_EXAMPLES
Expand Down
Loading