Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-test-package-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
echo "VERSION=${VERSION}" >> $GITHUB_ENV

- name: Lint source code
uses: misyltoad/arch-mingw-github-action@617caabb7a2f459c4e6dca76e0eb4974d7dc20b2
uses: misyltoad/arch-mingw-github-action@v8
with:
command: |
meson setup --cross-file "./build-win64.txt" -Denable_tests=True build/lint
ninja clang-format-check -C build/lint

- name: Build and run tests
uses: misyltoad/arch-mingw-github-action@617caabb7a2f459c4e6dca76e0eb4974d7dc20b2
uses: misyltoad/arch-mingw-github-action@v8
with:
command: |
./package-release.sh "${{ env.VERSION }}" build --enable-tests
Expand Down
88 changes: 68 additions & 20 deletions inc/catch2/catch_amalgamated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

// SPDX-License-Identifier: BSL-1.0

// Catch v3.15.2
// Generated: 2026-07-07 20:39:49.445081
// Catch v3.15.3
// Generated: 2026-07-26 22:17:52.418168
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
Expand Down Expand Up @@ -2394,7 +2394,7 @@ namespace Catch {
}

Version const& libraryVersion() {
static Version version( 3, 15, 2, "", 0 );
static Version version( 3, 15, 3, "", 0 );
return version;
}

Expand Down Expand Up @@ -2541,7 +2541,7 @@ namespace Catch {
bool isValid = next();
if ( !isValid ) {
Detail::throw_generator_exception(
"Coud not jump to Nth element: not enough elements" );
"Could not jump to Nth element: not enough elements" );
}
}
}
Expand Down Expand Up @@ -4678,12 +4678,28 @@ namespace Detail {



#include <cmath>
#include <locale>

namespace Catch {

namespace {
static bool needsEscape( char c ) {
return c == '"' || c == '\\' || c == '\b' || c == '\f' ||
c == '\n' || c == '\r' || c == '\t';
struct EscapeLUT {
bool escape[256] = {};
constexpr EscapeLUT() {
escape[static_cast<unsigned char>( '"' )] = true;
escape[static_cast<unsigned char>( '\\' )] = true;
escape[static_cast<unsigned char>( '\b' )] = true;
escape[static_cast<unsigned char>( '\f' )] = true;
escape[static_cast<unsigned char>( '\n' )] = true;
escape[static_cast<unsigned char>( '\r' )] = true;
escape[static_cast<unsigned char>( '\t' )] = true;
}
};
static constexpr EscapeLUT escapeLUT{};

static constexpr bool needsEscape( char c ) {
return escapeLUT.escape[static_cast<unsigned char>( c )];
}

static Catch::StringRef makeEscapeStringRef( char c ) {
Expand Down Expand Up @@ -4795,7 +4811,10 @@ namespace Catch {

JsonValueWriter::JsonValueWriter( std::ostream& os,
std::uint64_t indent_level ):
m_os{ os }, m_indent_level{ indent_level } {}
m_os{ os }, m_indent_level{ indent_level } {
// We use C locale so that writing of numerical values is locale-independent.
m_sstream.imbue( std::locale::classic() );
}

JsonObjectWriter JsonValueWriter::writeObject() && {
return JsonObjectWriter{ m_os, m_indent_level };
Expand All @@ -4809,26 +4828,55 @@ namespace Catch {
writeImpl( value, true );
}

void JsonValueWriter::write( float value ) && {
writeFloatingPoint( value );
}

void JsonValueWriter::write( double value ) && {
writeFloatingPoint( value );
}

void JsonValueWriter::write( bool value ) && {
writeImpl( value ? "true"_sr : "false"_sr, false );
}

template <typename T>
void JsonValueWriter::writeFloatingPoint( T value ) {
if ( Catch::isnan( value ) ) {
writeImpl( "NaN"_sr, false );
} else if ( std::isinf( value ) ) {
writeImpl( value < 0 ? "-Infinity"_sr : "Infinity"_sr, false );
} else {
m_sstream << value;
writeImpl( m_sstream.str(), false );
}
}

void JsonValueWriter::writeImpl( Catch::StringRef value, bool quote ) {
if ( quote ) { m_os << '"'; }
size_t current_start = 0;
for ( size_t i = 0; i < value.size(); ++i ) {
if ( needsEscape( value[i] ) ) {
if ( current_start < i ) {
m_os << value.substr( current_start, i - current_start );
// Escaping only makes sense for actual strings, which are passed
// with `quote == true`. Non-quoted values are things like bools
// and numbers, which cannot create inputs that need escaping.
if ( !quote ) {
m_os << value;
} else {
m_os << '"';
size_t current_start = 0;
for ( size_t i = 0; i < value.size(); ++i ) {
if ( needsEscape( value[i] ) ) {
if ( current_start < i ) {
m_os
<< value.substr( current_start, i - current_start );
}
m_os << makeEscapeStringRef( value[i] );
current_start = i + 1;
}
m_os << makeEscapeStringRef( value[i] );
current_start = i + 1;
}
if ( current_start < value.size() ) {
m_os << value.substr( current_start,
value.size() - current_start );
}
m_os << '"';
}
if ( current_start < value.size() ) {
m_os << value.substr( current_start, value.size() - current_start );
}
if ( quote ) { m_os << '"'; }
}

} // namespace Catch
Expand Down
18 changes: 13 additions & 5 deletions inc/catch2/catch_amalgamated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

// SPDX-License-Identifier: BSL-1.0

// Catch v3.15.2
// Generated: 2026-07-07 20:39:49.020441
// Catch v3.15.3
// Generated: 2026-07-26 22:17:52.004020
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
Expand Down Expand Up @@ -7572,7 +7572,7 @@ namespace Catch {

#define CATCH_VERSION_MAJOR 3
#define CATCH_VERSION_MINOR 15
#define CATCH_VERSION_PATCH 2
#define CATCH_VERSION_PATCH 3

#endif // CATCH_VERSION_MACROS_HPP_INCLUDED

Expand Down Expand Up @@ -7828,7 +7828,7 @@ namespace Generators {
void skipToNthElementImpl( std::size_t n ) override {
if ( n >= m_values.size() ) {
Detail::throw_generator_exception(
"Coud not jump to Nth element: not enough elements" );
"Could not jump to Nth element: not enough elements" );
}
m_idx = n;
}
Expand Down Expand Up @@ -8011,7 +8011,7 @@ namespace Generators {
void skipToNthElementImpl( std::size_t n ) override {
if ( n >= m_target ) {
Detail::throw_generator_exception(
"Coud not jump to Nth element: not enough elements" );
"Could not jump to Nth element: not enough elements" );
}

m_generator.skipToNthElement( n );
Expand Down Expand Up @@ -10309,11 +10309,19 @@ namespace Catch {
writeImpl( value, !std::is_arithmetic<T>::value );
}
void write( StringRef value ) &&;
void write( float value ) &&;
void write( double value ) &&;
void write( bool value ) &&;

private:
void writeImpl( StringRef value, bool quote );

// Helper to deal with non-finite floating point values, which
// are not standard JSON, but we use JS/Python/etc. approach of
// emitting `NaN`, `Infinity`, `-Infinity` as number(like).
template <typename T>
void writeFloatingPoint( T value );

// Without this SFINAE, this overload is a better match
// for `std::string`, `char const*`, `char const[N]` args.
// While it would still work, it would cause code bloat
Expand Down
2 changes: 1 addition & 1 deletion src/nvapi/nvapi_vulkan_low_latency_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace dxvk {
#define PFN_PARAM(proc) PFN_##proc proc
#define PFN_INIT(proc) m_##proc(proc)

std::pair<VkSemaphore, VkResult> CreateVkSemaphore(VkDevice device, PFN_PARAM(vkCreateSemaphore)) {
static std::pair<VkSemaphore, VkResult> CreateVkSemaphore(VkDevice device, PFN_PARAM(vkCreateSemaphore)) {
auto semaphoreTypeCreateInfo = VkSemaphoreTypeCreateInfo{
.sType = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO,
.pNext = nullptr,
Expand Down