mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 00:23:34 +02:00
Fixing build issues
This commit is contained in:
parent
3c6e98f16b
commit
cc1be64850
7 changed files with 130 additions and 177 deletions
|
@ -37,7 +37,7 @@ Descriptor Descriptor::parse(const uint8_t* const data, size_t size) {
|
|||
if (!read(ptr, remaining, result.header)) {
|
||||
return {};
|
||||
}
|
||||
if (!result.header.length == size) {
|
||||
if (result.header.length != size) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -124,6 +124,5 @@ void gpu::hfb::writeFrame(const std::string& filename,
|
|||
for (const auto& png : pngBuffers) {
|
||||
writeChunk(ptr, gpu::hfb::CHUNK_TYPE_PNG, png);
|
||||
}
|
||||
auto writeSize = ptr - output->data();
|
||||
assert(writeSize == size);
|
||||
assert((ptr - output->data()) == size);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ FramePointer readFrame(const std::string& filename, uint32_t externalTexture, co
|
|||
|
||||
namespace hfb {
|
||||
|
||||
constexpr char* EXTENSION{ ".hfb" };
|
||||
constexpr char* const EXTENSION{ ".hfb" };
|
||||
constexpr uint32_t HEADER_SIZE{ sizeof(uint32_t) * 3 };
|
||||
constexpr uint32_t CHUNK_HEADER_SIZE = sizeof(uint32_t) * 2;
|
||||
constexpr uint32_t MAGIC{ 0x49464948 };
|
||||
|
|
|
@ -12,129 +12,129 @@
|
|||
namespace gpu { namespace keys {
|
||||
|
||||
|
||||
constexpr char* binary = "binary";
|
||||
constexpr char* L00 = "L00";
|
||||
constexpr char* L1m1 = "L1m1";
|
||||
constexpr char* L10 = "L10";
|
||||
constexpr char* L11 = "L11";
|
||||
constexpr char* L2m2 = "L2m2";
|
||||
constexpr char* L2m1 = "L2m1";
|
||||
constexpr char* L20 = "L20";
|
||||
constexpr char* L21 = "L21";
|
||||
constexpr char* L22 = "L22";
|
||||
constexpr char* const binary = "binary";
|
||||
constexpr char* const L00 = "L00";
|
||||
constexpr char* const L1m1 = "L1m1";
|
||||
constexpr char* const L10 = "L10";
|
||||
constexpr char* const L11 = "L11";
|
||||
constexpr char* const L2m2 = "L2m2";
|
||||
constexpr char* const L2m1 = "L2m1";
|
||||
constexpr char* const L20 = "L20";
|
||||
constexpr char* const L21 = "L21";
|
||||
constexpr char* const L22 = "L22";
|
||||
|
||||
constexpr char* eyeProjections = "eyeProjections";
|
||||
constexpr char* eyeViews = "eyeViews";
|
||||
constexpr char* alphaToCoverageEnable = "alphaToCoverageEnable";
|
||||
constexpr char* antialisedLineEnable = "antialisedLineEnable";
|
||||
constexpr char* attributes = "attributes";
|
||||
constexpr char* batches = "batches";
|
||||
constexpr char* blendFunction = "blendFunction";
|
||||
constexpr char* borderColor = "borderColor";
|
||||
constexpr char* bufferMask = "bufferMask";
|
||||
constexpr char* buffers = "buffers";
|
||||
constexpr char* capturedTextures = "capturedTextures";
|
||||
constexpr char* channel = "channel";
|
||||
constexpr char* chunk = "chunk";
|
||||
constexpr char* colorAttachments = "colorAttachments";
|
||||
constexpr char* colorWriteMask = "colorWriteMask";
|
||||
constexpr char* commands = "commands";
|
||||
constexpr char* comparisonFunction = "comparisonFunction";
|
||||
constexpr char* cullMode = "cullMode";
|
||||
constexpr char* data = "data";
|
||||
constexpr char* depth = "depth";
|
||||
constexpr char* depthBias = "depthBias";
|
||||
constexpr char* depthBiasSlopeScale = "depthBiasSlopeScale";
|
||||
constexpr char* depthClampEnable = "depthClampEnable";
|
||||
constexpr char* depthStencilAttachment = "depthStencilAttachment";
|
||||
constexpr char* depthTest = "depthTest";
|
||||
constexpr char* drawCallInfos = "drawCallInfos";
|
||||
constexpr char* drawcallUniform = "drawcallUniform";
|
||||
constexpr char* drawcallUniformReset = "drawcallUniformReset";
|
||||
constexpr char* element = "element";
|
||||
constexpr char* fillMode = "fillMode";
|
||||
constexpr char* filter = "filter";
|
||||
constexpr char* formats = "formats";
|
||||
constexpr char* frameIndex = "frameIndex";
|
||||
constexpr char* framebuffer = "framebuffer";
|
||||
constexpr char* framebuffers = "framebuffers";
|
||||
constexpr char* frequency = "frequency";
|
||||
constexpr char* frontFaceClockwise = "frontFaceClockwise";
|
||||
constexpr char* height = "height";
|
||||
constexpr char* id = "id";
|
||||
constexpr char* ktxFile = "ktxFile";
|
||||
constexpr char* layers = "layers";
|
||||
constexpr char* maxAnisotropy = "maxAnisotropy";
|
||||
constexpr char* maxMip = "maxMip";
|
||||
constexpr char* minMip = "minMip";
|
||||
constexpr char* mipOffset = "mipOffset";
|
||||
constexpr char* mips = "mips";
|
||||
constexpr char* multisampleEnable = "multisampleEnable";
|
||||
constexpr char* name = "name";
|
||||
constexpr char* namedData = "namedData";
|
||||
constexpr char* names = "names";
|
||||
constexpr char* objects = "objects";
|
||||
constexpr char* offset = "offset";
|
||||
constexpr char* pipelines = "pipelines";
|
||||
constexpr char* pose = "pose";
|
||||
constexpr char* profileRanges = "profileRanges";
|
||||
constexpr char* program = "program";
|
||||
constexpr char* programs = "programs";
|
||||
constexpr char* projectionJitter = "projectionJitter";
|
||||
constexpr char* queries = "queries";
|
||||
constexpr char* sampleCount = "sampleCount";
|
||||
constexpr char* sampleMask = "sampleMask";
|
||||
constexpr char* sampler = "sampler";
|
||||
constexpr char* samples = "samples";
|
||||
constexpr char* scissorEnable = "scissorEnable";
|
||||
constexpr char* shaders = "shaders";
|
||||
constexpr char* size = "size";
|
||||
constexpr char* skybox = "skybox";
|
||||
constexpr char* slot = "slot";
|
||||
constexpr char* source = "source";
|
||||
constexpr char* state = "state";
|
||||
constexpr char* stencilActivation = "stencilActivation";
|
||||
constexpr char* stencilTestBack = "stencilTestBack";
|
||||
constexpr char* stencilTestFront = "stencilTestFront";
|
||||
constexpr char* stereo = "stereo";
|
||||
constexpr char* subresource = "subresource";
|
||||
constexpr char* swapchains = "swapchains";
|
||||
constexpr char* texelFormat = "texelFormat";
|
||||
constexpr char* texture = "texture";
|
||||
constexpr char* textureTables = "textureTables";
|
||||
constexpr char* textures = "textures";
|
||||
constexpr char* transforms = "transforms";
|
||||
constexpr char* type = "type";
|
||||
constexpr char* usageType = "usageType";
|
||||
constexpr char* view = "view";
|
||||
constexpr char* width = "width";
|
||||
constexpr char* wrapModeU = "wrapModeU";
|
||||
constexpr char* wrapModeV = "wrapModeV";
|
||||
constexpr char* wrapModeW = "wrapModeW";
|
||||
constexpr char* const eyeProjections = "eyeProjections";
|
||||
constexpr char* const eyeViews = "eyeViews";
|
||||
constexpr char* const alphaToCoverageEnable = "alphaToCoverageEnable";
|
||||
constexpr char* const antialisedLineEnable = "antialisedLineEnable";
|
||||
constexpr char* const attributes = "attributes";
|
||||
constexpr char* const batches = "batches";
|
||||
constexpr char* const blendFunction = "blendFunction";
|
||||
constexpr char* const borderColor = "borderColor";
|
||||
constexpr char* const bufferMask = "bufferMask";
|
||||
constexpr char* const buffers = "buffers";
|
||||
constexpr char* const capturedTextures = "capturedTextures";
|
||||
constexpr char* const channel = "channel";
|
||||
constexpr char* const chunk = "chunk";
|
||||
constexpr char* const colorAttachments = "colorAttachments";
|
||||
constexpr char* const colorWriteMask = "colorWriteMask";
|
||||
constexpr char* const commands = "commands";
|
||||
constexpr char* const comparisonFunction = "comparisonFunction";
|
||||
constexpr char* const cullMode = "cullMode";
|
||||
constexpr char* const data = "data";
|
||||
constexpr char* const depth = "depth";
|
||||
constexpr char* const depthBias = "depthBias";
|
||||
constexpr char* const depthBiasSlopeScale = "depthBiasSlopeScale";
|
||||
constexpr char* const depthClampEnable = "depthClampEnable";
|
||||
constexpr char* const depthStencilAttachment = "depthStencilAttachment";
|
||||
constexpr char* const depthTest = "depthTest";
|
||||
constexpr char* const drawCallInfos = "drawCallInfos";
|
||||
constexpr char* const drawcallUniform = "drawcallUniform";
|
||||
constexpr char* const drawcallUniformReset = "drawcallUniformReset";
|
||||
constexpr char* const element = "element";
|
||||
constexpr char* const fillMode = "fillMode";
|
||||
constexpr char* const filter = "filter";
|
||||
constexpr char* const formats = "formats";
|
||||
constexpr char* const frameIndex = "frameIndex";
|
||||
constexpr char* const framebuffer = "framebuffer";
|
||||
constexpr char* const framebuffers = "framebuffers";
|
||||
constexpr char* const frequency = "frequency";
|
||||
constexpr char* const frontFaceClockwise = "frontFaceClockwise";
|
||||
constexpr char* const height = "height";
|
||||
constexpr char* const id = "id";
|
||||
constexpr char* const ktxFile = "ktxFile";
|
||||
constexpr char* const layers = "layers";
|
||||
constexpr char* const maxAnisotropy = "maxAnisotropy";
|
||||
constexpr char* const maxMip = "maxMip";
|
||||
constexpr char* const minMip = "minMip";
|
||||
constexpr char* const mipOffset = "mipOffset";
|
||||
constexpr char* const mips = "mips";
|
||||
constexpr char* const multisampleEnable = "multisampleEnable";
|
||||
constexpr char* const name = "name";
|
||||
constexpr char* const namedData = "namedData";
|
||||
constexpr char* const names = "names";
|
||||
constexpr char* const objects = "objects";
|
||||
constexpr char* const offset = "offset";
|
||||
constexpr char* const pipelines = "pipelines";
|
||||
constexpr char* const pose = "pose";
|
||||
constexpr char* const profileRanges = "profileRanges";
|
||||
constexpr char* const program = "program";
|
||||
constexpr char* const programs = "programs";
|
||||
constexpr char* const projectionJitter = "projectionJitter";
|
||||
constexpr char* const queries = "queries";
|
||||
constexpr char* const sampleCount = "sampleCount";
|
||||
constexpr char* const sampleMask = "sampleMask";
|
||||
constexpr char* const sampler = "sampler";
|
||||
constexpr char* const samples = "samples";
|
||||
constexpr char* const scissorEnable = "scissorEnable";
|
||||
constexpr char* const shaders = "shaders";
|
||||
constexpr char* const size = "size";
|
||||
constexpr char* const skybox = "skybox";
|
||||
constexpr char* const slot = "slot";
|
||||
constexpr char* const source = "source";
|
||||
constexpr char* const state = "state";
|
||||
constexpr char* const stencilActivation = "stencilActivation";
|
||||
constexpr char* const stencilTestBack = "stencilTestBack";
|
||||
constexpr char* const stencilTestFront = "stencilTestFront";
|
||||
constexpr char* const stereo = "stereo";
|
||||
constexpr char* const subresource = "subresource";
|
||||
constexpr char* const swapchains = "swapchains";
|
||||
constexpr char* const texelFormat = "texelFormat";
|
||||
constexpr char* const texture = "texture";
|
||||
constexpr char* const textureTables = "textureTables";
|
||||
constexpr char* const textures = "textures";
|
||||
constexpr char* const transforms = "transforms";
|
||||
constexpr char* const type = "type";
|
||||
constexpr char* const usageType = "usageType";
|
||||
constexpr char* const view = "view";
|
||||
constexpr char* const width = "width";
|
||||
constexpr char* const wrapModeU = "wrapModeU";
|
||||
constexpr char* const wrapModeV = "wrapModeV";
|
||||
constexpr char* const wrapModeW = "wrapModeW";
|
||||
|
||||
|
||||
constexpr char* backWriteMask = "backWriteMask";
|
||||
constexpr char* frontWriteMask = "frontWriteMask";
|
||||
constexpr char* reference = "reference";
|
||||
constexpr char* readMask = "readMask";
|
||||
constexpr char* failOp = "failOp";
|
||||
constexpr char* depthFailOp = "depthFailOp";
|
||||
constexpr char* passOp = "passOp";
|
||||
constexpr char* enabled = "enabled";
|
||||
constexpr char* blend = "blend";
|
||||
constexpr char* flags = "flags";
|
||||
constexpr char* writeMask = "writeMask";
|
||||
constexpr char* function = "function";
|
||||
constexpr char* sourceColor = "sourceColor";
|
||||
constexpr char* sourceAlpha = "sourceAlpha";
|
||||
constexpr char* destColor = "destColor";
|
||||
constexpr char* destAlpha = "destAlpha";
|
||||
constexpr char* opColor = "opColor";
|
||||
constexpr char* opAlpha = "opAlpha";
|
||||
constexpr char* enable = "enable";
|
||||
constexpr char* contextDisable = "contextDisable";
|
||||
constexpr char* const backWriteMask = "backWriteMask";
|
||||
constexpr char* const frontWriteMask = "frontWriteMask";
|
||||
constexpr char* const reference = "reference";
|
||||
constexpr char* const readMask = "readMask";
|
||||
constexpr char* const failOp = "failOp";
|
||||
constexpr char* const depthFailOp = "depthFailOp";
|
||||
constexpr char* const passOp = "passOp";
|
||||
constexpr char* const enabled = "enabled";
|
||||
constexpr char* const blend = "blend";
|
||||
constexpr char* const flags = "flags";
|
||||
constexpr char* const writeMask = "writeMask";
|
||||
constexpr char* const function = "function";
|
||||
constexpr char* const sourceColor = "sourceColor";
|
||||
constexpr char* const sourceAlpha = "sourceAlpha";
|
||||
constexpr char* const destColor = "destColor";
|
||||
constexpr char* const destAlpha = "destAlpha";
|
||||
constexpr char* const opColor = "opColor";
|
||||
constexpr char* const opAlpha = "opAlpha";
|
||||
constexpr char* const enable = "enable";
|
||||
constexpr char* const contextDisable = "contextDisable";
|
||||
|
||||
constexpr char* COMMAND_NAMES[] = {
|
||||
constexpr char* const COMMAND_NAMES[] = {
|
||||
"draw",
|
||||
"drawIndexed",
|
||||
"drawInstanced",
|
||||
|
|
|
@ -22,7 +22,6 @@ if (BUILD_TOOLS)
|
|||
set(ALL_TOOLS
|
||||
udt-test
|
||||
vhacd-util
|
||||
frame-optimizer
|
||||
gpu-frame-player
|
||||
gpu-frame-converter
|
||||
ice-client
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
set(TARGET_NAME frame-optimizer)
|
||||
|
||||
setup_memory_debugger()
|
||||
setup_hifi_project(Gui Widgets)
|
||||
link_hifi_libraries(shared ktx shaders gpu )
|
||||
package_libraries_for_deployment()
|
|
@ -1,39 +0,0 @@
|
|||
//
|
||||
// Created by Bradley Austin Davis on 2018/10/14
|
||||
// Copyright 2014 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <gpu/FrameIO.h>
|
||||
#include <gpu/Texture.h>
|
||||
|
||||
|
||||
gpu::IndexOptimizer optimizer= [](gpu::Primitive primitive, uint32_t faceCount, uint32_t indexCount, uint32_t* indices ) {
|
||||
// FIXME add a triangle index optimizer here
|
||||
};
|
||||
|
||||
|
||||
void messageHandler(QtMsgType type, const QMessageLogContext &, const QString & message) {
|
||||
auto messageStr = message.toStdString();
|
||||
#ifdef Q_OS_WIN
|
||||
OutputDebugStringA(messageStr.c_str());
|
||||
OutputDebugStringA("\n");
|
||||
#endif
|
||||
std::cerr << messageStr << std::endl;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
QCoreApplication app(argc, argv);
|
||||
qInstallMessageHandler(messageHandler);
|
||||
gpu::optimizeFrame("D:/Frames/20190112_1647.json", optimizer);
|
||||
return 0;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
set(TARGET_NAME gpu-frame-converter)
|
||||
setup_memory_debugger()
|
||||
setup_hifi_project()
|
||||
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 17)
|
||||
# link in the shared libraries
|
||||
link_hifi_libraries( shared gpu shaders )
|
||||
|
||||
package_libraries_for_deployment()
|
||||
if (WIN32)
|
||||
set(TARGET_NAME gpu-frame-converter)
|
||||
setup_memory_debugger()
|
||||
setup_hifi_project()
|
||||
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 17)
|
||||
link_hifi_libraries( shared gpu shaders )
|
||||
package_libraries_for_deployment()
|
||||
endif()
|
Loading…
Reference in a new issue