Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
996316c
fix(agc): sample multisampled targets in read-only layout
Oct 16, 2026
5eb35dc
feat(agc): preserve initial native multisample color contents
Amoenus Oct 19, 2026
3e4f64e
test(agc): cover sampled DCC target recreation
Amoenus Oct 20, 2026
c6a2a38
test(agc): fail DCC recreation on Vulkan validation errors
Amoenus Oct 20, 2026
a877ad4
fix(agc): restore layouts when recreating multisample targets
Amoenus Oct 20, 2026
9290696
test(agc): require initial alias refusal without guest samples
Amoenus Oct 22, 2026
8acb2fc
chore(agc): refresh PR 6973 with current prerequisite
Amoenus Oct 22, 2026
02e02f2
chore(agc): refresh adapted sampling prerequisite on current main
Amoenus Oct 22, 2026
d09283a
chore(agc): compose initial color samples with merged FMASK support
Amoenus Oct 22, 2026
1ac674c
chore(agc): refresh 6971 with current prerequisite
Amoenus Oct 23, 2026
6ea3d0a
chore(agc): refresh 6973 with current prerequisite
Amoenus Oct 23, 2026
8f50f19
chore(agc): refresh 6971 for DCC clear integration
Amoenus Oct 23, 2026
093d117
chore(agc): refresh 6973 for DCC clear integration
Amoenus Oct 23, 2026
21c0c8f
chore(agc): refresh 6971 for current main
Amoenus Oct 23, 2026
6f0c2b1
chore(agc): refresh 6973 for current main
Amoenus Oct 23, 2026
550e9e7
chore(agc): refresh 6971 for current main
Amoenus Oct 24, 2026
bb885b3
chore(agc): refresh 6973 for current main
Amoenus Oct 24, 2026
9f414dd
Merge commit '379b1dca32ecc4e3570ad0a53c69f019b70dbe59' into codex/re…
Amoenus Oct 24, 2026
520cca3
chore(agc): refresh native color initialization on mainb4d8
Amoenus Oct 25, 2026
69a8a10
merge: refresh native color initialization on current main
Amoenus Oct 26, 2026
947c1df
merge: retain native DCC recreation and measured dither fixtures
Amoenus Oct 27, 2026
8d4fe6d
Merge commit '13926067ac6ef3290a74f79f397123d69fc76fb1' into codex/re…
Amoenus Oct 27, 2026
e4da60f
Merge current main dependency into native color PR6973
Amoenus Oct 28, 2026
3eda60d
chore: refresh native color PR6973 on current main
Amoenus Oct 28, 2026
c59398d
test(agc): retain packed float format in extended sample helper
Amoenus Oct 28, 2026
eceaf1d
test(agc): retain packed float format in extended descriptor helper
Amoenus Oct 28, 2026
625a7e2
chore: refresh native color 6973 on current main
Amoenus Oct 28, 2026
b3be3c1
Merge commit 'bb04a4f1ea0175e9e4f149f0359a764d62ff3296' into codex/re…
Amoenus Oct 29, 2026
13aba93
test(agc): model the repeated-storage guard color footprint
Amoenus Oct 29, 2026
f47ac97
Merge commit '8c8b9986204d5b1cbb23847b363df00ae832ec9c' into codex/re…
Amoenus Oct 30, 2026
9b7290a
Merge commit 'b1b5353cfcee098ed17e3ba8a6e616bee97c9215' into codex/re…
Amoenus Oct 30, 2026
aa4706c
test(agc): preserve guest data when replacing native color owners
Amoenus Oct 30, 2026
225b170
fix(agc): claim reused color memory before initialization
Amoenus Oct 30, 2026
f8e5f3c
test(agc): initialize a color footprint within a larger backing alloc…
Amoenus Oct 30, 2026
f41562f
Merge commit 'e8efeed58af48d0682ab2e0eab72cfaf996e4886' into codex/re…
Amoenus Oct 30, 2026
dcbc99d
test(agc): check unrelated-format MSAA ownership replacement
Amoenus Oct 30, 2026
106bc38
chore: merge current main into native multisample initialization
Amoenus Oct 31, 2026
2ced201
test(agc): use complete tiled surfaces for pass-break counters
Amoenus Oct 31, 2026
10183f9
merge: refresh initial color import after AGC test split
Amoenus Oct 31, 2026
045a176
chore: refresh native color PR 6973 with current prerequisite
Amoenus Nov 1, 2026
ad0429b
chore: refresh native color PR 6973 with shader binding corrections
Amoenus Nov 1, 2026
2914a02
chore: refresh PR6973 onto maind8b6
Amoenus Nov 1, 2026
7fdce1e
chore: synchronize PR6973 with unrelated main updates
Amoenus Nov 1, 2026
c6dbeca
chore: refresh multisample initialization review base
Amoenus Nov 1, 2026
34e8963
fix(agc): release initial color uploads after submission
Amoenus Nov 1, 2026
5551eb6
test(agc): correct storage promotion retention budget
Amoenus Nov 2, 2026
9d4395f
chore: synchronize PR6973 with skip classifier update
Amoenus Nov 2, 2026
c13719c
Merge commit '88e804b0a7df1f1ac373a9e2f72fb378d925fdd4' into HEAD
oneandonlydean Nov 2, 2026
0714085
chore: refresh PR6973 against current prerequisites
Amoenus Nov 2, 2026
b0fc235
refactor(agc): share the merged guest-sample upload path
Amoenus Nov 2, 2026
201339f
test(agc): adapt merged varying-sample calls to the extended fixture
Amoenus Nov 2, 2026
dd03794
test(agc): adapt merged varying-sample calls to the extended fixture
Amoenus Nov 2, 2026
ef63c81
fix(agc): preserve the caller pool through shared sample upload
Amoenus Nov 2, 2026
eb5b18f
chore: merge current main into native color stack
Amoenus Nov 3, 2026
17d6030
fix(agc): preserve initialization guards while tracking current main
Amoenus Nov 4, 2026
a7845db
fix(agc): collect guest rewrites before initial color reuse
Amoenus Nov 4, 2026
d202708
test(agc): leave drawn-owner reuse to the publication regression
Amoenus Nov 4, 2026
af3c17f
test(agc): keep initial-content coverage scoped to supported ownership
Amoenus Nov 4, 2026
9eb1a86
test(agc): allocate the full resident target footprint
Amoenus Nov 4, 2026
ef2bcde
chore: refresh validated graphics changes on current main
Amoenus Nov 4, 2026
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
2 changes: 1 addition & 1 deletion core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Texture {
// compute pass writing it and the next pass sampling it share one image and copy nothing.
// CanCopyFrom says whether the two descriptors address the same surface compatibly.
Texture(const Context& context, const std::shared_ptr<StorageTexture>& source, const GuestTextureResource& descriptor, VkComponentMapping components);
Texture(const Context& context, VkImage depthImage, VkFormat depthFormat, VkImageAspectFlags aspect, VkComponentMapping components, VkImageViewType viewType = VK_IMAGE_VIEW_TYPE_2D, std::uint32_t baseLayer = 0, std::shared_ptr<OwnedImage> owner = {}, VkImageUsageFlags usage = 0, std::uint32_t layerCount = VK_REMAINING_ARRAY_LAYERS);
Texture(const Context& context, VkImage depthImage, VkFormat depthFormat, VkImageAspectFlags aspect, VkComponentMapping components, VkImageViewType viewType = VK_IMAGE_VIEW_TYPE_2D, std::uint32_t baseLayer = 0, std::shared_ptr<OwnedImage> owner = {}, VkImageUsageFlags usage = 0, std::uint32_t layerCount = VK_REMAINING_ARRAY_LAYERS, VkImageLayout imageLayout = VK_IMAGE_LAYOUT_GENERAL);
struct DepthCopyTag {};
Texture(const Context& context, const std::shared_ptr<StorageTexture>& source, const GuestTextureResource& descriptor, VkComponentMapping components, DepthCopyTag);
struct SrgbExpandTag {};
Expand Down
154 changes: 107 additions & 47 deletions core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,9 @@ Texture::Texture(const Context& context, const std::shared_ptr<StorageTexture>&
}
}

Texture::Texture(const Context& context, VkImage depthImage, VkFormat depthFormat, VkImageAspectFlags aspect, VkComponentMapping components, VkImageViewType viewType, std::uint32_t baseLayer, std::shared_ptr<OwnedImage> owner, VkImageUsageFlags usage, std::uint32_t layerCount) : context(context), owned(std::move(owner)) {
Texture::Texture(const Context& context, VkImage depthImage, VkFormat depthFormat, VkImageAspectFlags aspect, VkComponentMapping components, VkImageViewType viewType, std::uint32_t baseLayer, std::shared_ptr<OwnedImage> owner, VkImageUsageFlags usage, std::uint32_t layerCount, VkImageLayout imageLayout) : context(context), owned(std::move(owner)) {
Require(owned == nullptr || (owned->image == depthImage && owned->context.device == context.device), "a depth sampled view must retain its own device and image");
layout = VK_IMAGE_LAYOUT_GENERAL;
layout = imageLayout;
VkImageViewCreateInfo viewInfo{VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO};
VkImageViewUsageCreateInfo viewUsage{VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO};
viewUsage.usage = usage;
Expand Down
16 changes: 10 additions & 6 deletions core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11500,7 +11500,7 @@ void multisampleGuestAccessTests(const Device& device, Recorder& recorder) {
std::cout << "4x color targets or nullDescriptor unavailable: multisampled target guest access not tested\n";
return;
}
constexpr std::uint32_t side = 64;
constexpr std::uint32_t side = 128;
constexpr std::size_t targetBytes = 65536u;
constexpr std::size_t bytes = 5u * 65536u;
#ifdef _WIN32
Expand Down Expand Up @@ -11559,6 +11559,7 @@ void multisampleGuestAccessTests(const Device& device, Recorder& recorder) {
target.extent = {side, side};
target.surfaceExtent = target.extent;
target.format = VK_FORMAT_R8G8B8A8_UNORM;
target.tileMode = ColorTileMode::RenderTarget;
target.bytes = targetBytes;
target.samples = 4;
const bool ordered = MayReorderSamples(context, target.samples) && SampleOrderStorageFormat(context, target.format, target.elementBytes, target.samples) != VK_FORMAT_UNDEFINED;
Expand Down Expand Up @@ -11676,7 +11677,7 @@ void multisampleGuestAccessTests(const Device& device, Recorder& recorder) {
ShaderResources arraySecond(context, sampledArrayCompute);
ShaderResources combined(context, bothShapesCompute);
Require(first.SampledTextures().size() == 1 && first.SampledTextures().front() != nullptr, "the multisampled target was not bound as a sampled texture");
Require(first.SampledTextures().front()->Layout() == VK_IMAGE_LAYOUT_GENERAL && first.SampledTextures().front()->ViewFormat() == target.format, "the sampled multisampled target is not a view of the target's image in its layout");
Require(first.SampledTextures().front()->Layout() == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL && first.SampledTextures().front()->ViewFormat() == target.format, "the sampled multisampled target is not a read-only view of the target's image");
Require(first.SampledTextures().front()->SampledViewRange(false).type == VK_IMAGE_VIEW_TYPE_2D, "Image2DMultisample did not bind a 2D image view");
Require(second.SampledTextures().front() == first.SampledTextures().front(), "a second lookup of the multisampled target made another texture");
Require(arrayFirst.SampledTextures().size() == 1 && arrayFirst.SampledTextures().front() != nullptr, "the multisampled array target was not bound as a sampled texture");
Expand All @@ -11689,8 +11690,8 @@ void multisampleGuestAccessTests(const Device& device, Recorder& recorder) {
device.WaitQueue();
recorder.Sync();
}
refusedSample(ShaderRecompiler::DescriptorKind::SampledImage, multisampledWords(side, 3u, address), "as a 64x64 texture of 8 samples", "sampling a 4x target as an 8x texture");
refusedSample(ShaderRecompiler::DescriptorKind::SampledImage, multisampledWords(side / 2u, 2u, address), "as a 32x64 texture of 4 samples", "sampling a 4x target as a narrower texture");
refusedSample(ShaderRecompiler::DescriptorKind::SampledImage, multisampledWords(side, 3u, address), "as a 128x128 texture of 8 samples", "sampling a 4x target as an 8x texture");
refusedSample(ShaderRecompiler::DescriptorKind::SampledImage, multisampledWords(side / 2u, 2u, address), "as a 64x128 texture of 4 samples", "sampling a 4x target as a narrower texture");
refusedSample(ShaderRecompiler::DescriptorKind::SampledImage, multisampledWords(side, 2u, address + 4u * 65536u), "which no draw rendered to and whose tile mode 0 has no modeled multisampled color footprint", "sampling a linear multisampled texture no draw rendered to");
if (context.storageImageMultisample) {
const auto stored = sampledProgram(ShaderRecompiler::DescriptorKind::StorageImage, multisampledWords(side, 2u, address));
Expand All @@ -11706,10 +11707,11 @@ void multisampleGuestAccessTests(const Device& device, Recorder& recorder) {
} else {
refusedSample(ShaderRecompiler::DescriptorKind::StorageImage, multisampledWords(side, 2u, address), "as a storage image at its sample count", "storage access to a multisampled target without shaderStorageImageMultisample");
}
refused([&] { AgcDriver::GuestMemory::Read(address + 3u * 65536u + 256u, texels); }, "a CPU read", "a CPU read in the padding of a later sample plane");
refused([&] { AgcDriver::GuestMemory::Read(address + 3u * 65536u + 256u, texels); }, "a CPU read", "a CPU read in the last block of the 4x target");
AgcDriver::GuestMemory::Read(address + 4u * 65536u, texels);
clearTargets();
target.tileMode = ColorTileMode::RenderTarget;
target.extent = {side / 2u, side / 2u};
target.surfaceExtent = target.extent;
{
std::lock_guard gpu(GpuMutex());
Require(MultisampleTargetView(context, target) != VK_NULL_HANDLE, "the tiled multisampled target has no view");
Expand Down Expand Up @@ -11870,6 +11872,8 @@ void repeatStorageGuardTests(const Device& device, Recorder& recorder) {
target.format = VK_FORMAT_R8G8B8A8_UNORM;
target.bytes = targetBytes;
target.samples = 4;
target.tileMode = ColorTileMode::RenderTarget;
Require(MultisampledColorBytes(target) == targetBytes, "the guarding multisampled target has an unexpected footprint");
std::lock_guard gpu(GpuMutex());
Require(MultisampleTargetView(context, target) != VK_NULL_HANDLE, "the guarding multisampled target has no view");
recorder.Submit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ target_include_directories(agc_driver_alpha_to_coverage_tests PRIVATE $<TARGET_P

if(BUILD_TESTING)
add_test(NAME agc_driver_dithered_alpha_to_coverage COMMAND agc_driver_alpha_to_coverage_tests --dithered8)
add_test(NAME agc_driver_msaa_dcc_recreate_layout COMMAND agc_driver_alpha_to_coverage_tests --dcc-recreate-layout)
add_test(NAME agc_driver_two_sample_dithered_alpha_to_coverage COMMAND agc_driver_alpha_to_coverage_tests --dithered2)
set(multisampledDccClearTests)
set(multisampledDccClearTests agc_driver_msaa_dcc_recreate_layout)
foreach(samples IN ITEMS 2 4 8)
set(testName "agc_driver_msaa_dcc_srgb_clear_${samples}")
add_test(NAME ${testName} COMMAND agc_driver_alpha_to_coverage_tests --dcc-srgb-clear ${samples})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ if(BUILD_TESTING)
set_tests_properties(agc_driver_native_msaa_vertex_input PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
endif()
add_test(NAME agc_driver_native_color_initial COMMAND agc_driver_sample_multisample_target_tests --initial)
add_test(NAME agc_driver_native_color_initial_lifetime COMMAND agc_driver_sample_multisample_target_tests --initial-lifetime)
set_tests_properties(agc_driver_native_color_initial agc_driver_native_color_initial_lifetime PROPERTIES TIMEOUT 30 ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
if(WIN32)
set_tests_properties(agc_driver_native_color_initial agc_driver_native_color_initial_lifetime PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
endif()
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ struct Scene {
Pages pixels{TargetLayout.Bytes()};
Pages vertices{BlockBytes};
Pages code{BlockBytes};
Pages constants{BlockBytes};
Pages constants{BlockBytes * 2};
Pages spare{BlockBytes};
Pages ring{BlockBytes};
bool cachedVertex = false;
Expand Down
97 changes: 97 additions & 0 deletions core/libs/prx/libSceAgcDriver/tests/execution/AlphaToCoverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,98 @@ void DitheredCoverage(AgcDriver::VulkanDevice& device, std::uint32_t samples, st
AgcDriver::Graphics::ClearMultisampleTargets(device.Device());
}

void CheckDccSamples(AgcDriver::VulkanDevice& device, const AgcDriver::Graphics::ColorTarget& target, const Color& written, float untouched) {
alignas(256) static constexpr std::array<std::uint32_t, 26> code{
0x34020087, 0xe0301000, 0x80000201, 0xe0301004, 0x80000301, 0xe0301008, 0x80000401, 0xe030100c,
0x80000501, 0xe0301010, 0x80000601, 0xe0301014, 0x80000701, 0xbf8c3f70, 0xf0001f30, 0x00011005,
0xbf8c3f70, 0xe0701030, 0x80001001, 0xe0701034, 0x80001101, 0xe0701038, 0x80001201, 0xe070103c,
0x80001301, 0xbf810000,
};
alignas(256) static std::array<std::uint32_t, 32u * 32u> buffer{};
buffer.fill(0xdeadbeefu);
const auto address = reinterpret_cast<std::uintptr_t>(buffer.data());
const auto imageAddress = target.address | target.pipeBankXor;
const auto sampleShift = static_cast<std::uint32_t>(std::countr_zero(target.samples));
const std::array<std::uint32_t, 4> descriptor{static_cast<std::uint32_t>(address), static_cast<std::uint32_t>((address >> 32u) & 0xffffu), static_cast<std::uint32_t>(sizeof(buffer)), 0x31016facu};
const std::array<std::uint32_t, 8> image{
static_cast<std::uint32_t>(imageAddress >> 8u),
static_cast<std::uint32_t>((imageAddress >> 40u) & 0xffu) | (71u << 20u) | (((Width - 1u) & 3u) << 30u),
((Width - 1u) >> 2u) | ((Height - 1u) << 14u),
0xfacu | (sampleShift << 16u) | (0x1bu << 20u) | (14u << 28u), 0u, sampleShift << 4u, 0u, 0u,
};
std::vector<std::uint32_t> userData(16u);
std::copy(descriptor.begin(), descriptor.end(), userData.begin());
std::copy(image.begin(), image.end(), userData.begin() + 4u);
for (std::uint32_t tid = 0; tid < 32u; ++tid) {
const std::array<std::uint32_t, 6> coordinates{0u, 0u, 0u, (tid / target.samples) % 2u == 0u ? 0u : ScissorWidth, 0u, tid % target.samples};
std::copy(coordinates.begin(), coordinates.end(), buffer.begin() + tid * 32u);
}
const auto codeAddress = reinterpret_cast<std::uintptr_t>(code.data());
const std::array<ShaderRecompiler::MemoryRegion, 1> memory{{{codeAddress, std::as_bytes(std::span(code))}}};
const ShaderRecompiler::ShaderComputeStageInfo compute{{32u, 1u, 1u}, 0u, {false, false, false}, false, 1};
ShaderRecompiler::RecompileRequest request{
{ShaderStage::Compute, codeAddress, code, 0, {}},
{32, 0, userData, compute, std::nullopt, std::nullopt, memory},
device.Target(),
{0, 0, 0, 128}
};
request.useCache = false;
device.Dispatch(ShaderRecompiler::Recompile(request), 1u, 1u, 1u, {}, codeAddress);
device.WaitIdle();
for (std::uint32_t tid = 0; tid < 32u; ++tid) {
for (std::uint32_t channel = 0; channel < 4u; ++channel) {
const auto expected = (tid / target.samples) % 2u == 0u && tid % target.samples == 0u ? written[channel] : untouched;
Require(std::bit_cast<float>(buffer[tid * 32u + 12u + channel]) == expected, "a sampled DCC target did not preserve its drawn and untouched samples across recreation");
}
}
}

void DccRecreateLayoutTests(AgcDriver::VulkanDevice& device) {
const ColorTargetLayout layout(Width, Height, ColorTileMode::RenderTarget, 8);
Block source(layout.Bytes() * 4u);
Block metadata(BlockBytes);
Block resolved(layout.Bytes());
struct ClearTargets {
AgcDriver::VulkanDevice& device;
~ClearTargets() {
std::lock_guard lock(AgcDriver::GuestMemory::GpuMutex());
device.SubmitRecorded(true);
device.WaitIdle();
AgcDriver::Graphics::ClearMultisampleTargets(device.Device());
AgcDriver::Graphics::ClearCachedTextures(device.Device());
}
} clearTargets{device};
std::memset(source.data, 0, source.bytes);
std::memset(metadata.data, 0, metadata.bytes);
std::memset(resolved.data, 0, resolved.bytes);
auto target = DecodeTarget(source, 4u);
target.dccAddress = metadata.Address();
target.dccPipeAligned = true;
const Color written{0.25f, 0.25f, 0.25f, 0.25f};
Draw(device, target, false, Float32Export, Program(written, Float32Export, 1u), false, true);
CheckDccSamples(device, target, written, 0.0f);
const std::vector<std::byte> ones(AgcDriver::Graphics::MultisampledDccBytes(target), std::byte{0xc0});
AgcDriver::GuestMemory::Write(metadata.Address(), ones);
target.pipeBankXor = 0x4000u;
Draw(device, target, false, Float32Export, Program(written, Float32Export, 1u), false, true);
CheckDccSamples(device, target, written, 1.0f);
AgcDriver::Graphics::ColorMetadataPass pass{};
pass.mode = AgcDriver::Graphics::ColorMetadataPass::Mode::Resolve;
pass.source = target;
pass.targets = {DecodeTarget(resolved)};
device.ColorMetadataPass(pass);
const auto stored = ReadBack(device, resolved);
for (std::uint32_t y = 0; y < Height; ++y) {
for (std::uint32_t x = 0; x < Width; ++x) {
for (std::uint32_t channel = 0; channel < 4u; ++channel) {
const auto expected = x < ScissorWidth ? 1.0f + (written[channel] - 1.0f) / 4.0f : 1.0f;
Require(FromHalf(stored[layout.Offset(x, y) / 2u + channel]) == expected, "a sampled DCC target recreated with another pipe-bank XOR did not resolve its new samples");
}
}
}
programCount = 0;
}

constexpr std::array<DitherCase, 36> EightSampleDitherCases{{
{0x00000000u, 9u, {0x00u, 0x00u, 0x00u, 0x00u}},
{0x80000000u, 9u, {0x00u, 0x00u, 0x00u, 0x00u}},
Expand Down Expand Up @@ -1269,6 +1361,11 @@ int main(int argc, char** argv) {
try {
const auto device = OpenVulkanTestDevice();
if (!device) return VulkanTestSkipped;
if (argc == 2 && std::string_view(argv[1]) == "--dcc-recreate-layout") {
DccRecreateLayoutTests(*device);
std::puts("sampled multisample DCC target recreation and read-back passed");
return 0;
}
if (argc == 3 && std::string_view(argv[1]) == "--dcc-srgb-clear") {
const auto samples = std::string_view(argv[2]) == "2" ? 2u : std::string_view(argv[2]) == "4" ? 4u : std::string_view(argv[2]) == "8" ? 8u : 0u;
Require(samples != 0, "unknown sRGB DCC test sample count");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ void MultisampledCase(AgcDriver::VulkanDevice& device, const Shaders& compiled,
}};
AgcDriver::Graphics::State state{};
state.stages = {AgcDriver::Graphics::ShaderPath::Vertex, 0u, 32u, 32u, std::nullopt, std::nullopt};
state.color = {reinterpret_cast<std::uintptr_t>(block + MultisampledColorOffset), {Width, Height}, VK_FORMAT_R8G8B8A8_UNORM, Width * Height * 16u, 0xe4u};
state.color = {reinterpret_cast<std::uintptr_t>(block + MultisampledColorOffset), {Width, Height}, VK_FORMAT_R8G8B8A8_UNORM, 1u << 16u, 0xe4u};
state.color.tileMode = AgcDriver::Graphics::ColorTileMode::RenderTarget;
state.color.samples = 4;
state.colors = {state.color};
state.hasColorTarget = true;
Expand Down
Loading
Loading