mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
test(shader,agc): cover Image2DMultisampleArray descriptor binding and dimension check
This commit is contained in:
1 parent
90896ff0ce
commit
b155e1d0eb
2 files changed
+17
No files matched your search
@@ -507,6 +507,8 @@ void RunGuestTextureResourceTests() {
|
||||
Require(MatchesGuestDimension(Shape::Image2DArray, TextureDimension::k2DArray), "2D array shape must match 2D array dimension");
|
||||
Require(MatchesGuestDimension(Shape::Image2DMultisample, TextureDimension::k2DMsaa), "multisampled shape must match the multisampled dimension");
|
||||
Require(!MatchesGuestDimension(Shape::Image2DMultisample, TextureDimension::k2D), "multisampled shape must not match 2D dimension");
|
||||
Require(MatchesGuestDimension(Shape::Image2DMultisampleArray, TextureDimension::k2DMsaa), "multisampled array shape must match the multisampled dimension");
|
||||
Require(!MatchesGuestDimension(Shape::Image2DMultisampleArray, TextureDimension::k2DArray), "multisampled array shape must not match 2D array dimension");
|
||||
Require(!MatchesGuestDimension(Shape::Image2D, TextureDimension::k2DMsaa), "2D shape must not match the multisampled dimension");
|
||||
Require(MatchesGuestDimension(Shape::Image2DArray, TextureDimension::kCube), "a cube must be readable as a 2D array of its faces");
|
||||
Require(MatchesGuestDimension(Shape::ImageCube, TextureDimension::kCube), "cube shape must match cube dimension");
|
||||
|
||||
@@ -4295,6 +4295,21 @@ void verifyUnusedUnnormalizedSampler() {
|
||||
require(normalized[0].imageUnnormalized == std::vector<bool>{false} && normalized[1].samplerUnnormalized == std::vector<bool>{false}, "unnormalized samplers: a normalized S# was flagged");
|
||||
static_cast<void>(populate(offset));
|
||||
expectFailure([&] { static_cast<void>(populate(foldOnly)); }, "normalized guest sampler is used with a texel offset that is not a constant", "unnormalized samplers: a normalized S# was accepted for an offset that only folds");
|
||||
ImageResource msaaArrayImage{};
|
||||
msaaArrayImage.resourceClass = ImageResourceClass::Sampled;
|
||||
msaaArrayImage.numericClass = IrTextureNumericClass::Float;
|
||||
msaaArrayImage.dimension = RdnaImageDimension::Dim2DMsaaArray;
|
||||
msaaArrayImage.read = true;
|
||||
ShaderInfo msaaArrayInfo;
|
||||
msaaArrayInfo.images = {msaaArrayImage};
|
||||
msaaArrayInfo.runtimeImageModes = {ResourceMaterializer::RuntimeImageModes(msaaArrayImage)};
|
||||
BindingAllocationResult msaaArrayAllocation;
|
||||
msaaArrayAllocation.layout.descriptors = {{DescriptorBindingForImage(msaaArrayImage), {0u}}};
|
||||
auto msaaArraySnapshot = snapshot;
|
||||
msaaArraySnapshot.images[0].dwords[3] = 0xf0020facu;
|
||||
msaaArraySnapshot.images[0].dwords[5] = 0x00000020u;
|
||||
DescriptorBindingBuilder{}.Populate(msaaArrayAllocation, msaaArrayInfo, IrShaderStage::Compute, 0u, msaaArraySnapshot, {});
|
||||
require(msaaArrayAllocation.bindings.size() == 1u && msaaArrayAllocation.bindings[0].imageShape == DescriptorImageShape::Image2DMultisampleArray, "multisampled array image resource did not receive Image2DMultisampleArray descriptor shape");
|
||||
}
|
||||
|
||||
void verifyWaveUniformValues() {
|
||||
|
||||
Reference in new issue
Block a user