Apply a random seed when NOT in benchmark mode to have 100% deterministic runs in all samples (#1127)
* Apply a random seed when NOT in benchmark mode to have 100% deterministic runs These samples lack the check for benchmark.active when applying a random seed, which is done for other samples. * Update texture3d.cpp
This commit is contained in:
parent
478b6c39bf
commit
3d4446fa15
6 changed files with 26 additions and 27 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Vulkan Example - Using VK_EXT_graphics_pipeline_library
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2022-2023 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||
|
|
@ -374,7 +374,7 @@ public:
|
|||
shaderStageCI.pName = "main";
|
||||
|
||||
// Select lighting model using a specialization constant
|
||||
srand((unsigned int)time(NULL));
|
||||
srand(benchmark.active ? 0 : ((unsigned int)time(NULL)));
|
||||
uint32_t lighting_model = (int)(rand() % 4);
|
||||
|
||||
// Each shader constant of a shader stage corresponds to one map entry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue