🐛 Fixed building manual tests

This commit is contained in:
Edgar 2024-02-25 13:31:14 +01:00
parent ea70ba2031
commit fc4f5a6aed
No known key found for this signature in database
GPG key ID: 3C2E1F2C1C353131
12 changed files with 68 additions and 31 deletions

View file

@ -2,6 +2,9 @@
# Copyright 2021-2023 Overte e.V. # Copyright 2021-2023 Overte e.V.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# TODO: this test still uses QScriptEngine
return()
# FIXME Disabling test on OSX because of unexpected link error # FIXME Disabling test on OSX because of unexpected link error
if (NOT APPLE) if (NOT APPLE)
set(TARGET_NAME controllers-test) set(TARGET_NAME controllers-test)

View file

@ -11,10 +11,15 @@ setup_thread_debugger()
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/") set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
# link in the shared libraries # link in the shared libraries
link_hifi_libraries(entities avatars shared octree gpu graphics fbx networking animation audio gl) link_hifi_libraries(
entities hfm avatars script-engine image
procedural material-networking ktx shaders
model-networking shared octree gpu graphics
model-serializers networking animation audio gl
)
if (WIN32) if (WIN32)
add_dependency_external_projects(wasapi) add_dependency_external_projects(wasapi)
endif () endif ()
package_libraries_for_deployment() package_libraries_for_deployment()

View file

@ -1,3 +1,8 @@
# This is a windows only test
if(NOT WIN32)
return()
endif ()
set(TARGET_NAME gl-test) set(TARGET_NAME gl-test)
# This is not a testcase -- just set it up as a regular hifi project # This is not a testcase -- just set it up as a regular hifi project
setup_hifi_project(Quick Gui OpenGL) setup_hifi_project(Quick Gui OpenGL)

View file

@ -10,7 +10,7 @@ setup_thread_debugger()
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/") set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
link_hifi_libraries( link_hifi_libraries(
shared shaders task networking gl shared shaders task networking gl
ktx gpu octree ktx gpu octree
${PLATFORM_GL_BACKEND} ${PLATFORM_GL_BACKEND}
) )

View file

@ -142,9 +142,9 @@ void TexturesTest::onChangeTextures() {
const auto& textureFile = ALL_TEXTURE_FILES[i]; const auto& textureFile = ALL_TEXTURE_FILES[i];
auto texture = gpu::Texture::unserialize(textureFile); auto texture = gpu::Texture::unserialize(textureFile);
qDebug() << textureFile.c_str(); qDebug() << textureFile.c_str();
qDebug() << texture->getTexelFormat().getSemantic(); qDebug() << texture.first->getTexelFormat().getSemantic();
qDebug() << texture->getTexelFormat().getScalarCount(); qDebug() << texture.first->getTexelFormat().getScalarCount();
textures.push_back(texture); textures.push_back(texture.first);
} }
#endif #endif
index = 0; index = 0;

View file

@ -9,17 +9,14 @@ setup_memory_debugger()
setup_thread_debugger() setup_thread_debugger()
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/") set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
link_hifi_libraries( link_hifi_libraries(
shared task networking gl shared task networking gl
ktx shaders gpu procedural octree image ktx shaders gpu procedural octree image
graphics model-networking fbx hfm animation material-networking material-networking ktx shaders model-networking
script-engine render render-utils graphics model-networking model-serializers hfm animation material-networking
${PLATFORM_GL_BACKEND} script-engine render render-utils
${PLATFORM_GL_BACKEND}
) )
if (WIN32)
add_dependency_external_projects(wasapi)
endif ()
package_libraries_for_deployment() package_libraries_for_deployment()
target_nsight() target_nsight()

View file

@ -110,7 +110,7 @@ void TestWindow::beginFrame() {
_renderDeferredInputs.edit0() = frameTransform; // Pass the deferredFrameTransform _renderDeferredInputs.edit0() = frameTransform; // Pass the deferredFrameTransform
_renderDeferredInputs.edit1() = _prepareDeferredOutputs.get0(); // Pass the deferredFramebuffer _renderDeferredInputs.edit1() = _prepareDeferredOutputs.get0(); // Pass the deferredFramebuffer
_renderDeferredInputs.edit2() = lightingModel; // Pass the lightingModel _renderDeferredInputs.edit3() = lightingModel; // Pass the lightingModel
// the rest of the renderDeferred inputs can be omitted // the rest of the renderDeferred inputs can be omitted
#else #else

View file

@ -8,6 +8,8 @@
#pragma once #pragma once
#include "RenderDeferredTask.h"
#include <QtGui/QWindow> #include <QtGui/QWindow>
#include <QtCore/QTime> #include <QtCore/QTime>

View file

@ -162,7 +162,28 @@ class MyTestWindow : public TestWindow {
} }
}; };
extern uvec2 rectifySize(const uvec2& size); static const glm::uvec2 SPARSE_PAGE_SIZE(128);
uint rectifyDimension(const uint& dimension) {
if (dimension == 0) {
return 0;
}
if (dimension < SPARSE_PAGE_SIZE.x) {
uint newSize = SPARSE_PAGE_SIZE.x;
while (dimension <= newSize / 2) {
newSize /= 2;
}
return newSize;
} else {
uint pages = (dimension / SPARSE_PAGE_SIZE.x) + (dimension % SPARSE_PAGE_SIZE.x == 0 ? 0 : 1);
return pages * SPARSE_PAGE_SIZE.x;
}
}
glm::uvec2 rectifySize(const glm::uvec2& size) {
return { rectifyDimension(size.x), rectifyDimension(size.y) };
}
void testSparseRectify() { void testSparseRectify() {
std::vector<std::pair<uvec2, uvec2>> SPARSE_SIZE_TESTS { std::vector<std::pair<uvec2, uvec2>> SPARSE_SIZE_TESTS {

View file

@ -1,3 +1,5 @@
# TODO: this test uses functions that dont exist anymore
return()
set(TARGET_NAME render-perf-test) set(TARGET_NAME render-perf-test)
@ -17,8 +19,9 @@ link_hifi_libraries(
shared task workload networking animation shared task workload networking animation
ktx image octree ktx image octree
shaders gl gpu ${PLATFORM_GL_BACKEND} shaders gl gpu ${PLATFORM_GL_BACKEND}
render render-utils render render-utils
graphics hfm fbx model-networking graphics-scripting material-networking ktx shaders model-networking
graphics hfm model-serializers model-networking graphics-scripting
entities entities-renderer audio avatars script-engine entities entities-renderer audio avatars script-engine
physics procedural midi qml ui physics procedural midi qml ui
${PLATFORM_GL_BACKEND} ${PLATFORM_GL_BACKEND}

View file

@ -64,6 +64,7 @@
#include <TextureCache.h> #include <TextureCache.h>
#include <FramebufferCache.h> #include <FramebufferCache.h>
#include <model-networking/ModelCache.h> #include <model-networking/ModelCache.h>
#include <material-networking/TextureCache.h>
#include <GeometryCache.h> #include <GeometryCache.h>
#include <DeferredLightingEffect.h> #include <DeferredLightingEffect.h>
#include <render/RenderFetchCullSortTask.h> #include <render/RenderFetchCullSortTask.h>
@ -246,7 +247,7 @@ public:
_context.makeCurrent(); _context.makeCurrent();
_frameTimes.resize(FRAME_TIME_BUFFER_SIZE, 0); _frameTimes.resize(FRAME_TIME_BUFFER_SIZE, 0);
{ {
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::display_plugins::program::SrgbToLinear); gpu::ShaderPointer program = gpu::Shader::createProgram(shader::display_plugins::program::InterleavedSrgbToLinear);
gpu::StatePointer state = gpu::StatePointer(new gpu::State()); gpu::StatePointer state = gpu::StatePointer(new gpu::State());
_presentPipeline = gpu::Pipeline::create(program, state); _presentPipeline = gpu::Pipeline::create(program, state);
} }

View file

@ -1,9 +1,9 @@
set(TARGET_NAME render-texture-load) set(TARGET_NAME render-texture-load)
if (WIN32) if (WIN32)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4049 /ignore:4217") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4049 /ignore:4217")
endif() endif ()
setup_memory_debugger() setup_memory_debugger()
setup_thread_debugger() setup_thread_debugger()
@ -14,13 +14,13 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
# link in the shared libraries # link in the shared libraries
link_hifi_libraries( link_hifi_libraries(
shared task networking octree shared task networking octree
shaders gl gpu render ktx image animation shaders gl gpu render ktx image animation
graphics hfm fbx model-networking graphics hfm model-serializers model-networking
render-utils render-utils material-networking procedural
entities entities-renderer audio avatars entities entities-renderer audio avatars
script-engine physics script-engine physics
${PLATFORM_GL_BACKEND} ${PLATFORM_GL_BACKEND}
) )
package_libraries_for_deployment() package_libraries_for_deployment()
@ -32,7 +32,7 @@ target_zlib()
target_quazip() target_quazip()
if (WIN32) if (WIN32)
add_dependency_external_projects(wasapi) add_dependency_external_projects(wasapi)
endif () endif ()