Skip to content

Commit 5e51e9e

Browse files
committed
Merge branch 'master' into cad-text-rendering
2 parents e58298a + c6d5ee3 commit 5e51e9e

File tree

21 files changed

+6932
-6
lines changed

21 files changed

+6932
-6
lines changed

05_StreamingAndBufferDeviceAddressApp/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class StreamingAndBufferDeviceAddressApp final : public application_templates::M
127127
m_downStreamingBufferAddress = m_downStreamingBuffer->getBuffer()->getDeviceAddress();
128128

129129
// People love Reflection but I prefer Shader Sources instead!
130-
const nbl::asset::SPushConstantRange pcRange = {.stageFlags=IShader::ESS_COMPUTE,.offset=0,.size=sizeof(PushConstantData)};
130+
const nbl::asset::SPushConstantRange pcRange = {.stageFlags=IShader::E_SHADER_STAGE::ESS_COMPUTE,.offset=0,.size=sizeof(PushConstantData)};
131131

132132
// This time we'll have no Descriptor Sets or Layouts because our workload has a widely varying size
133133
// and using traditional SSBO bindings would force us to update the Descriptor Set every frame.
@@ -236,7 +236,7 @@ class StreamingAndBufferDeviceAddressApp final : public application_templates::M
236236
.outputAddress=m_downStreamingBufferAddress+outputOffset,
237237
.dataElementCount=elementCount
238238
};
239-
cmdbuf->pushConstants(m_pipeline->getLayout(),IShader::ESS_COMPUTE,0u,sizeof(pc),&pc);
239+
cmdbuf->pushConstants(m_pipeline->getLayout(),IShader::E_SHADER_STAGE::ESS_COMPUTE,0u,sizeof(pc),&pc);
240240
// Good old trick to get rounded up divisions, in case you're not familiar
241241
cmdbuf->dispatch((elementCount-1)/WorkgroupSize+1,1,1);
242242
cmdbuf->end();

61_UI/main.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ class UISampleApp final : public examples::SimpleWindowedApplication
365365
if (!device_base_t::onAppInitialized(smart_refctd_ptr(system)))
366366
return false;
367367

368-
m_semaphore = m_device->createSemaphore(m_submitIx);
368+
m_semaphore = m_device->createSemaphore(m_realFrameIx);
369369
if (!m_semaphore)
370370
return logFail("Failed to Create a Semaphore!");
371371

@@ -594,7 +594,7 @@ class UISampleApp final : public examples::SimpleWindowedApplication
594594
{
595595
{
596596
.semaphore = m_semaphore.get(),
597-
.value = ++m_submitIx,
597+
.value = ++m_realFrameIx,
598598
.stageMask = PIPELINE_STAGE_FLAGS::COLOR_ATTACHMENT_OUTPUT_BIT
599599
}
600600
};
@@ -623,7 +623,7 @@ class UISampleApp final : public examples::SimpleWindowedApplication
623623
};
624624

625625
if (queue->submit(infos) != IQueue::RESULT::SUCCESS)
626-
m_submitIx--;
626+
m_realFrameIx--;
627627
}
628628
}
629629

@@ -682,7 +682,6 @@ class UISampleApp final : public examples::SimpleWindowedApplication
682682
smart_refctd_ptr<ISemaphore> m_semaphore;
683683
smart_refctd_ptr<IGPUCommandPool> m_cmdPool;
684684
uint64_t m_realFrameIx : 59 = 0;
685-
uint64_t m_submitIx : 59 = 0;
686685
uint64_t m_maxFramesInFlight : 5;
687686
std::array<smart_refctd_ptr<IGPUCommandBuffer>, ISwapchain::MaxImages> m_cmdBufs;
688687
ISimpleManagedSurface::SAcquireResult m_currentImageAcquire = {};

old_to_refactor/07.SubpassBaking/main.cpp

Lines changed: 482 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
include(common RESULT_VARIABLE RES)
2+
if(NOT RES)
3+
message(FATAL_ERROR "common.cmake not found. Should be in {repo_root}/cmake directory")
4+
endif()
5+
6+
set(EXAMPLE_SOURCES
7+
../../src/nbl/ext/LumaMeter/CLumaMeter.cpp
8+
../../src/nbl/ext/ToneMapper/CToneMapper.cpp
9+
)
10+
11+
set(ASSET_DIR ${PROJECT_SOURCE_DIR}/examples_tests/media)
12+
13+
nbl_create_executable_project("${EXAMPLE_SOURCES}" "" "" ${ASSET_DIR})
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#version 430 core
2+
3+
// Copyright (C) 2018-2020 - DevSH Graphics Programming Sp. z O.O.
4+
// This file is part of the "Nabla Engine".
5+
// For conditions of distribution and use, see copyright notice in nabla.h
6+
7+
// vertex shader is provided by the fullScreenTriangle extension
8+
9+
layout (set = 3, binding = 0) uniform usampler2DArray tex0;
10+
11+
layout(location = 0) in vec2 TexCoord;
12+
13+
layout(location = 0) out vec4 pixelColor;
14+
15+
void main()
16+
{
17+
const uint packed = texture(tex0, vec3(TexCoord.x, TexCoord.y, 1.0)).r;
18+
pixelColor = unpackUnorm4x8(packed);
19+
}

0 commit comments

Comments
 (0)