Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion lib/src/vkloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -1791,15 +1793,16 @@ 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);
}

// 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(
Expand Down
8 changes: 7 additions & 1 deletion tests/loadtests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand All @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions tests/loadtests/appfwSDL/GLAppSDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/loadtests/appfwSDL/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "AppBaseSDL.h"
#include <SDL3/SDL_main.h>
#include "platform_utils.h"
#if defined(EMSCRIPTEN)
#if defined(__EMSCRIPTEN__)
#include <emscripten.h>
#endif

Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading