Skip to content

Commit 862dffc

Browse files
Dynamic Texture Indexing is indexing the wrong textures :(
1 parent 4b073e1 commit 862dffc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

examples_tests/21.DynamicTextureIndexing/main.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ class DynamicTextureIndexingApp : public ApplicationBase
372372
mdiCallParams[i].maxCount = pmbData.mdiParameterCount;
373373
}
374374

375+
//
376+
cpu2gpuParams.beginCommandBuffers();
377+
375378
//create pipeline
376379
IAssetLoader::SAssetLoadParams lp;
377380
auto vertexShaderBundle = assetManager->getAsset("../mesh.vert", lp);
@@ -417,7 +420,6 @@ class DynamicTextureIndexingApp : public ApplicationBase
417420
}
418421

419422
auto gpuShaders = cpu2gpu.getGPUObjectsFromAssets(shaders, shaders + 2, cpu2gpuParams);
420-
//cpu2gpuParams.waitForCreationToComplete();
421423
IGPUSpecializedShader* shaders[2] = { gpuShaders->operator[](0).get(), gpuShaders->operator[](1).get() };
422424

423425
gpuPipelineLayout = logicalDevice->createGPUPipelineLayout(range, range + 1, core::smart_refctd_ptr(ds0layout), core::smart_refctd_ptr(ds1layout));
@@ -454,7 +456,6 @@ class DynamicTextureIndexingApp : public ApplicationBase
454456

455457

456458
auto gpuTexture = cpu2gpu.getGPUObjectsFromAssets(&texture, &texture + 1, cpu2gpuParams)->front();
457-
cpu2gpuParams.waitForCreationToComplete();
458459

459460
info[bind].image.imageLayout = asset::EIL_UNDEFINED;
460461
info[bind].image.sampler = core::smart_refctd_ptr(sampler);
@@ -487,6 +488,8 @@ class DynamicTextureIndexingApp : public ApplicationBase
487488
}
488489
}
489490

491+
cpu2gpuParams.waitForCreationToComplete();
492+
490493
core::vectorSIMDf cameraPosition(-4, 0, 0);
491494
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 100000);
492495
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 1.f, 1.f);

examples_tests/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ N = No support
5252
| 18.MitsubaLoader | S | N | S | S | N | S | N | N | BUILD_MITSUBA_LOADER |
5353
| FREE_SLOT | | | | | | | | | |
5454
| 20.Megatexture | S | S | S | S | S | S | N | S | |
55-
| 21.DynamicTextureIndexing | S | N | S | S | N | S | N | S | |
55+
| 21.DynamicTextureIndexing | B | B | B | S | N | S | N | S | |
5656
| 22.RaytracedAO | N | N | W | N | N | W | N | N | BUILD_MITSUBA_LOADER |
5757
| 23.Autoexposure | Y | Y | Y | S | S | S | N | S | |
5858
| FREE_SLOT | | | | | | | | | |

0 commit comments

Comments
 (0)