Skip to content

Commit

Permalink
A few minor changes
Browse files Browse the repository at this point in the history
Add #include <algorithm> to FreeCamera.cpp for std::clamp

Move kApi constant definition to source files for FishTornado and
GraphicsPipeline apps
  • Loading branch information
apazylbe committed Nov 14, 2023
1 parent ad912d0 commit 1840414
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions benchmarks/graphics_pipeline/FreeCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <algorithm>

#include "FreeCamera.h"

#include "ppx/math_util.h"
Expand Down
6 changes: 6 additions & 0 deletions benchmarks/graphics_pipeline/GraphicsBenchmarkApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ static constexpr size_t SPHERE_METAL_ROUGHNESS_SAMPLER_REGISTER = 6;

static constexpr size_t QUADS_SAMPLED_IMAGE_REGISTER = 0;

#if defined(USE_DX12)
const grfx::Api kApi = grfx::API_DX_12_0;
#elif defined(USE_VK)
const grfx::Api kApi = grfx::API_VK_1_1;
#endif

void GraphicsBenchmarkApp::InitKnobs()
{
const auto& cl_options = GetExtraOptions();
Expand Down
6 changes: 0 additions & 6 deletions benchmarks/graphics_pipeline/GraphicsBenchmarkApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@
#include <array>
#include <vector>

#if defined(USE_DX12)
const grfx::Api kApi = grfx::API_DX_12_0;
#elif defined(USE_VK)
const grfx::Api kApi = grfx::API_VK_1_1;
#endif

static constexpr uint32_t kMaxSphereInstanceCount = 3000;
static constexpr uint32_t kSeed = 89977;
static constexpr uint32_t kMaxFullscreenQuadsCount = 1000;
Expand Down
6 changes: 6 additions & 0 deletions projects/fishtornado_xr/FishTornado.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ constexpr uint32_t kCausticsImageCount = 32;
constexpr float3 kFogColor = float3(15.0f, 86.0f, 107.0f) / 255.0f;
constexpr float3 kFloorColor = float3(145.0f, 189.0f, 155.0f) / 255.0f;

#if defined(USE_DX12)
const grfx::Api kApi = grfx::API_DX_12_0;
#elif defined(USE_VK)
const grfx::Api kApi = grfx::API_VK_1_1;
#endif

} // namespace

FishTornadoApp* FishTornadoApp::GetThisApp()
Expand Down
6 changes: 0 additions & 6 deletions projects/fishtornado_xr/FishTornado.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
#include <filesystem>
#include <vector>

#if defined(USE_DX12)
const grfx::Api kApi = grfx::API_DX_12_0;
#elif defined(USE_VK)
const grfx::Api kApi = grfx::API_VK_1_1;
#endif

struct FishTornadoSettings
{
bool usePCF = true;
Expand Down

0 comments on commit 1840414

Please sign in to comment.