mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Merge branch 'black' of github.com:samcake/hifi into black-bis
This commit is contained in:
commit
609bc6385e
3 changed files with 101 additions and 1 deletions
|
@ -128,7 +128,11 @@ void FBXReader::consolidateFBXMaterials(const QVariantHash& mapping) {
|
|||
QString materialMapString = mapping.value("materialMap").toString();
|
||||
QJsonDocument materialMapDocument = QJsonDocument::fromJson(materialMapString.toUtf8());
|
||||
QJsonObject materialMap = materialMapDocument.object();
|
||||
|
||||
if (!materialMapString.isEmpty()) {
|
||||
if (materialMapDocument.isEmpty() || materialMap.isEmpty()) {
|
||||
qCDebug(modelformat) << "fbx Material Map found but did not produce valid JSON:" << materialMapString;
|
||||
}
|
||||
}
|
||||
for (QHash<QString, FBXMaterial>::iterator it = _fbxMaterials.begin(); it != _fbxMaterials.end(); it++) {
|
||||
FBXMaterial& material = (*it);
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
#include "nvToolsExt.h"
|
||||
#endif
|
||||
|
||||
// Define the GPU_BATCH_DETAILED_TRACING to get detailed tracing of the commands during the batch executions
|
||||
// #define GPU_BATCH_DETAILED_TRACING
|
||||
|
||||
#include <GPUIdent.h>
|
||||
|
||||
#include "GLTexture.h"
|
||||
|
@ -271,6 +274,8 @@ void GLBackend::renderPassDraw(const Batch& batch) {
|
|||
case Batch::COMMAND_drawIndexedInstanced:
|
||||
case Batch::COMMAND_multiDrawIndirect:
|
||||
case Batch::COMMAND_multiDrawIndexedIndirect: {
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "drawcall");
|
||||
|
||||
// updates for draw calls
|
||||
++_currentDraw;
|
||||
updateInput();
|
||||
|
@ -281,6 +286,94 @@ void GLBackend::renderPassDraw(const Batch& batch) {
|
|||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
#ifdef GPU_BATCH_DETAILED_TRACING
|
||||
//case Batch::COMMAND_setModelTransform:
|
||||
//case Batch::COMMAND_setViewTransform:
|
||||
//case Batch::COMMAND_setProjectionTransform:
|
||||
case Batch::COMMAND_setProjectionJitter:
|
||||
case Batch::COMMAND_setViewportTransform:
|
||||
case Batch::COMMAND_setDepthRangeTransform:
|
||||
{
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "transform");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
case Batch::COMMAND_clearFramebuffer:
|
||||
{
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "clear");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
case Batch::COMMAND_blit:
|
||||
{
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "blit");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
case Batch::COMMAND_setInputFormat:
|
||||
case Batch::COMMAND_setInputBuffer:
|
||||
case Batch::COMMAND_setIndexBuffer:
|
||||
case Batch::COMMAND_setIndirectBuffer: {
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "input");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
case Batch::COMMAND_setStateBlendFactor:
|
||||
case Batch::COMMAND_setStateScissorRect:
|
||||
case Batch::COMMAND_setPipeline: {
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "pipeline");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
case Batch::COMMAND_setUniformBuffer:
|
||||
{
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "ubo");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
case Batch::COMMAND_setResourceBuffer:
|
||||
case Batch::COMMAND_setResourceTexture:
|
||||
case Batch::COMMAND_setResourceTextureTable:
|
||||
{
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "resource");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
|
||||
case Batch::COMMAND_setResourceFramebufferSwapChainTexture:
|
||||
case Batch::COMMAND_setFramebuffer:
|
||||
case Batch::COMMAND_setFramebufferSwapChain:
|
||||
{
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "framebuffer");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
case Batch::COMMAND_generateTextureMips:
|
||||
{
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "genMipMaps");
|
||||
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
case Batch::COMMAND_beginQuery:
|
||||
case Batch::COMMAND_endQuery:
|
||||
case Batch::COMMAND_getQuery:
|
||||
{
|
||||
PROFILE_RANGE(render_gpu_gl_detail, "query");
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default: {
|
||||
CommandCall call = _commandCalls[(*command)];
|
||||
(this->*(call))(batch, *offset);
|
||||
|
@ -294,6 +387,8 @@ void GLBackend::renderPassDraw(const Batch& batch) {
|
|||
}
|
||||
|
||||
void GLBackend::render(const Batch& batch) {
|
||||
PROFILE_RANGE(render_gpu_gl, batch.getName());
|
||||
|
||||
_transform._skybox = _stereo._skybox = batch.isSkyboxEnabled();
|
||||
// Allow the batch to override the rendering stereo settings
|
||||
// for things like full framebuffer copy operations (deferred lighting passes)
|
||||
|
|
|
@ -95,6 +95,7 @@ public:
|
|||
~Batch();
|
||||
|
||||
void setName(const char* name);
|
||||
const char* getName() const { return _name; }
|
||||
void clear();
|
||||
|
||||
// Batches may need to override the context level stereo settings
|
||||
|
|
Loading…
Reference in a new issue