Sitelet https://github.com/GameTechDev/IntroductionToVulkan/commit/67b0dd27c992513883911a503f111b93269b52f6
Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Commit 67b0dd2

Browse files
committed
Fixed code responsible for checking minimal required device parameters (limits).
1 parent 638d77d commit 67b0dd2

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Project/Common/VulkanCommon.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ namespace ApiWithoutSecrets {
359359

360360
uint32_t major_version = VK_VERSION_MAJOR( device_properties.apiVersion );
361361

362-
if( (major_version < 1) &&
362+
if( (major_version < 1) ||
363363
(device_properties.limits.maxImageDimension2D < 4096) ) {
364364
std::cout << "Physical device " << physical_device << " doesn't support required parameters!" << std::endl;
365365
return false;

‎Project/Tutorial01/Tutorial01.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ namespace ApiWithoutSecrets {
210210
uint32_t minor_version = VK_VERSION_MINOR( device_properties.apiVersion );
211211
uint32_t patch_version = VK_VERSION_PATCH( device_properties.apiVersion );
212212

213-
if( (major_version < 1) &&
213+
if( (major_version < 1) ||
214214
(device_properties.limits.maxImageDimension2D < 4096) ) {
215215
std::cout << "Physical device " << physical_device << " doesn't support required parameters!" << std::endl;
216216
return false;

‎Project/Tutorial02/Tutorial02.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ namespace ApiWithoutSecrets {
335335

336336
uint32_t major_version = VK_VERSION_MAJOR( device_properties.apiVersion );
337337

338-
if( (major_version < 1) &&
338+
if( (major_version < 1) ||
339339
(device_properties.limits.maxImageDimension2D < 4096) ) {
340340
std::cout << "Physical device " << physical_device << " doesn't support required parameters!" << std::endl;
341341
return false;

0 commit comments

Comments
 (0)