Skip to content

Commit bf2f40f

Browse files
minor adjustments for output and style
1 parent 570c3cc commit bf2f40f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

07_StagingAndMultipleQueues/app_resources/comp_shader.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ void main(uint32_t3 ID : SV_DispatchThreadID)
1818
if(ID.x >= width || ID.y >= height)
1919
return;
2020

21-
float4 texel = texture.SampleLevel(samplerState, ID.xy, 0.0);
21+
const float32_t4 texel = texture.SampleLevel(samplerState, ID.xy, 0.0);
2222

23-
const uint32_t redVal = uint32_t(texel.r * 255u);
24-
const uint32_t greenVal = uint32_t(texel.g * 255u);
25-
const uint32_t blueVal = uint32_t(texel.b * 255u);
23+
const uint32_t redVal = uint32_t(texel.r * 255.f + 0.5f);
24+
const uint32_t greenVal = uint32_t(texel.g * 255.f + 0.5f);
25+
const uint32_t blueVal = uint32_t(texel.b * 255.f + 0.5f);
2626

2727
InterlockedAdd(histogram[constants.histogramBufferOffset + RED_OFFSET + redVal], 1);
2828
InterlockedAdd(histogram[constants.histogramBufferOffset + GREEN_OFFSET + greenVal], 1);

07_StagingAndMultipleQueues/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
482482
auto& file = files[imageHistogramIdx];
483483
for (uint32_t i = 0u; i < CHANEL_CNT; ++i)
484484
{
485+
constexpr const char* channelNames[] = {"RED","GREEN","BLUE"};
486+
file << channelNames[i] << ',';
485487
for (uint32_t j = 0u; j < VAL_PER_CHANEL_CNT; ++j)
486488
{
487489
file << histogramBuff[offset] << ',';

24_ColorSpaceTest/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class ColorSpaceTestSampleApp final : public examples::SimpleWindowedApplication
342342
const IGPUCommandBuffer::SClearColorValue clearValue = { .float32 = {1.f,0.f,1.f,1.f} };
343343
auto scRes = static_cast<CDefaultSwapchainFramebuffers*>(m_surface->getSwapchainResources());
344344
const IGPUCommandBuffer::SRenderpassBeginInfo info = {
345-
.framebuffer = scRes->getFrambuffer(acquire.imageIndex),
345+
.framebuffer = scRes->getFramebuffer(acquire.imageIndex),
346346
.colorClearValues = &clearValue,
347347
.depthStencilClearValues = nullptr,
348348
.renderArea = currentRenderArea

0 commit comments

Comments
 (0)