diff --git a/lib/src/vkloader.c b/lib/src/vkloader.c index b40e9c4d05..e46f0cb80c 100644 --- a/lib/src/vkloader.c +++ b/lib/src/vkloader.c @@ -1750,6 +1750,8 @@ setImageLayout( assert(KTX_FALSE); } + VkPipelineStageFlags destStageFlags = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; + // Target layouts (new) // The destination access mask controls the dependency for the new image // layout. @@ -1791,7 +1793,9 @@ setImageLayout( = VK_ACCESS_HOST_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT; } imageMemoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT; + destStageFlags = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT; break; + default: /* Value not used by callers, so not supported. */ assert(KTX_FALSE); @@ -1799,7 +1803,6 @@ setImageLayout( // Put barrier on top of pipeline. VkPipelineStageFlags srcStageFlags = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; - VkPipelineStageFlags destStageFlags = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; // Add the barrier to the passed command buffer vkFuncs.vkCmdPipelineBarrier( diff --git a/tests/loadtests/CMakeLists.txt b/tests/loadtests/CMakeLists.txt index 7b97c06fb1..8355b60b1e 100644 --- a/tests/loadtests/CMakeLists.txt +++ b/tests/loadtests/CMakeLists.txt @@ -111,6 +111,7 @@ target_compile_features(appfwSDL PUBLIC c_std_99 cxx_std_17) if(EMSCRIPTEN) target_compile_options( appfwSDL PUBLIC "SHELL:--use-port=sdl3" + "SHELL:-Wno-experimental" ) endif() @@ -143,6 +144,12 @@ PUBLIC SDL3::SDL3 ) +target_link_options( + appfwSDL +PUBLIC + -Wno-experimental +) + if(${KTX_FEATURE_LOADTEST_APPS} MATCHES "OpenGL") add_library( GLAppSDL STATIC appfwSDL/GLAppSDL.cpp @@ -154,7 +161,6 @@ if(${KTX_FEATURE_LOADTEST_APPS} MATCHES "OpenGL") if(EMSCRIPTEN) target_compile_options( GLAppSDL PUBLIC "SHELL:-s DISABLE_EXCEPTION_CATCHING=0" - "SHELL:--use-port=sdl3" ) endif() diff --git a/tests/loadtests/appfwSDL/GLAppSDL.cpp b/tests/loadtests/appfwSDL/GLAppSDL.cpp index c1a0cb5936..f939e241aa 100644 --- a/tests/loadtests/appfwSDL/GLAppSDL.cpp +++ b/tests/loadtests/appfwSDL/GLAppSDL.cpp @@ -51,11 +51,11 @@ GLAppSDL::initialize(Args& args) SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minorVersion); // On SDL3 this defaults to 8. On SDL2 it was 0. SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0); -#if !defined(EMSCRIPTEN) +#if !defined(__EMSCRIPTEN__) if (majorVersion >= 3) SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1); #endif -#if defined(DEBUG) && !defined(EMSCRIPTEN) +#if defined(DEBUG) && !defined(__EMSCRIPTEN__) SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG); #endif diff --git a/tests/loadtests/appfwSDL/main.cpp b/tests/loadtests/appfwSDL/main.cpp index 7d1b498315..3817b623a1 100644 --- a/tests/loadtests/appfwSDL/main.cpp +++ b/tests/loadtests/appfwSDL/main.cpp @@ -22,7 +22,7 @@ #include "AppBaseSDL.h" #include #include "platform_utils.h" -#if defined(EMSCRIPTEN) +#if defined(__EMSCRIPTEN__) #include #endif @@ -37,7 +37,7 @@ // ); #define setAnimationCallback(win, cb, userdata) \ SDL_SetiOSAnimationCallback(win, 1, cb, userdata) -#elif defined(EMSCRIPTEN) +#elif defined(__EMSCRIPTEN__) #define NEED_MAIN_LOOP 0 //void emscripten_set_main_loop_arg(em_arg_callback_func func, void *arg, // int fps, int simulate_infinite_loop); diff --git a/tests/loadtests/glloadtests/shader-based/InstancedSampleBase.cpp b/tests/loadtests/glloadtests/shader-based/InstancedSampleBase.cpp index 052086305e..65daf4c5cb 100644 --- a/tests/loadtests/glloadtests/shader-based/InstancedSampleBase.cpp +++ b/tests/loadtests/glloadtests/shader-based/InstancedSampleBase.cpp @@ -388,7 +388,7 @@ InstancedSampleBase::updateUniformBufferMatrices() glm::radians(rotation.z), glm::vec3(0.0f, 0.0f, 1.0f)); -#if !defined(EMSCRIPTEN) +#if !defined(__EMSCRIPTEN__) // Only update the matrices part of the uniform buffer uint8_t *pData = (uint8_t*)glMapBufferRange(GL_UNIFORM_BUFFER, 0, sizeof(uboVS.matrices), diff --git a/tests/loadtests/glloadtests/shader-based/TextureCubemap.cpp b/tests/loadtests/glloadtests/shader-based/TextureCubemap.cpp index 3e8b10d5bb..53e2ccf1a1 100644 --- a/tests/loadtests/glloadtests/shader-based/TextureCubemap.cpp +++ b/tests/loadtests/glloadtests/shader-based/TextureCubemap.cpp @@ -559,7 +559,7 @@ TextureCubemap::updateUniformBuffers() glBindBuffer(GL_UNIFORM_BUFFER, gnUbo); -#if !defined(EMSCRIPTEN) +#if !defined(__EMSCRIPTEN__) uint8_t* pData = (uint8_t*)glMapBufferRange(GL_UNIFORM_BUFFER, 0, sizeof(ubo), GL_MAP_WRITE_BIT);