Incorrect output after GPU to GPU inference via VideoFrame and Gray8 models (#10425)

* If the tensor is of gray8 format, we should call the gray8 shader

* other check (which resolves to unknown in this case) is incorrectly being compared to constant and not DXGI_FORMAT

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
This commit is contained in:
Sheil Kumar 2022-01-28 08:45:57 -08:00 committed by GitHub
parent feae842a7c
commit 2dd5e75ba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -483,7 +483,8 @@ void TensorToVideoFrameConverter::ConvertGPUTensorToDX12Texture(
PipelineStateCacheFormat formatFrom = PipelineStateCacheFormat::kBGR8;
if (tensorDesc.channelType == kImageTensorChannelTypeRGB8) {
formatFrom = PipelineStateCacheFormat::kRGB8;
} else if (inputDesc.Format == kImageTensorChannelTypeGRAY8) {
} else if (inputDesc.Format == DXGI_FORMAT_R8_UNORM ||
tensorDesc.channelType == kImageTensorChannelTypeGRAY8) {
formatFrom = PipelineStateCacheFormat::kGRAY8;
}