File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
MoltenVK/MoltenVK/GPUObjects Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 596
596
if (getMVKConfig ().useMTLHeap ) {
597
597
auto * extFeatures = (VkPhysicalDeviceImage2DViewOf3DFeaturesEXT*)next;
598
598
extFeatures->image2DViewOf3D = true ;
599
-
600
- // TODO (ncesario-lunarg) Related CTS tests (e.g., dEQP-VK.pipeline.monolithic.image_2d_view_3d_image.compute.sampler.mip0_layer0)
601
- // are failing with this enabled.
602
- extFeatures->sampler2DViewOf3D = false ;
599
+ extFeatures->sampler2DViewOf3D = true ;
603
600
}
604
601
break ;
605
602
}
Original file line number Diff line number Diff line change @@ -1112,7 +1112,9 @@ static MTLRegion getMTLRegion(const ImgRgn& imgRgn) {
1112
1112
1113
1113
// Metal before 3.0 doesn't support 3D compressed textures, so we'll
1114
1114
// decompress the texture ourselves, and we need to be able to write to it.
1115
- bool makeWritable = MVK_MACOS && _is3DCompressed;
1115
+ // Additionally, the ability to create 2D view over 3D image is dependent
1116
+ // on the write capability to work correctly.
1117
+ bool makeWritable = (MVK_MACOS && _is3DCompressed) || _is2DViewOn3DImageCompatible;
1116
1118
if (makeWritable) {
1117
1119
mvkEnableFlags (mtlUsage, MTLTextureUsageShaderWrite );
1118
1120
}
You can’t perform that action at this time.
0 commit comments