Skip to content

Commit

Permalink
Incorrect output after GPU to GPU inference via VideoFrame and Gray8 …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
smk2007 and Sheil Kumar authored Jan 28, 2022
1 parent feae842 commit 2dd5e75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion winml/lib/Api.Image/TensorToVideoFrameConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2dd5e75

Please sign in to comment.