Skip to content

Commit 3115fa6

Browse files
committed
Fix DXResrouceBinding publishing crash
1 parent 09ead18 commit 3115fa6

17 files changed

+51
-39
lines changed

Samples/WinMLSamplesGallery/WinMLSamplesGallery (Package)/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Identity
1010
Name="MicrosoftCorporationII.WindowsMLSamplesGallery"
1111
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
12-
Version="1.0.7.0" />
12+
Version="1.0.8.0" />
1313

1414
<Properties>
1515
<DisplayName>Windows ML Samples Gallery</DisplayName>

Samples/WinMLSamplesGallery/WinMLSamplesGallery (Package)/WinMLSamplesGallery (Package).wapproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<AppxPackageSigningEnabled>False</AppxPackageSigningEnabled>
4545
<EntryPointProjectUniqueName>..\WinMLSamplesGallery\WinMLSamplesGallery.csproj</EntryPointProjectUniqueName>
4646
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
47-
<PackageCertificateThumbprint>25067E5853327016828B1097611C6D97DAF9F5E8</PackageCertificateThumbprint>
47+
<PackageCertificateThumbprint>A22BAAEE253C6FB6D2972C02E0B1945C85644F89</PackageCertificateThumbprint>
4848
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
4949
<GenerateTestArtifacts>True</GenerateTestArtifacts>
5050
<AppxBundlePlatforms>x86|x64|arm64</AppxBundlePlatforms>

Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/DXResourceBindingORT/DXResourceBindingORT.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ private async void LaunchWindow(object sender, RoutedEventArgs e)
4141
ToggleLaunchWindowButton();
4242
ToggleLoadingTxtVisibility();
4343

44-
await Task.Run(() => WinMLSamplesGalleryNative.DXResourceBinding.LaunchWindow());
44+
var packagePath = Windows.ApplicationModel.Package.Current.InstalledLocation.Path;
45+
await Task.Run(() => WinMLSamplesGalleryNative.DXResourceBinding.LaunchWindow(packagePath));
4546

4647
ToggleLoadingTxtVisibility();
4748
ClassifyCube();

Samples/WinMLSamplesGallery/WinMLSamplesGallery/WinMLSamplesGallery.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
<ItemGroup>
3131
<None Remove="AllSamplesPage.xaml" />
3232
<None Remove="Controls\PerformanceMonitor.xaml" />
33+
<None Remove="dx_preprocessor_efficient_net.onnx" />
34+
<None Remove="efficientnet-lite4-11.onnx" />
3335
<None Remove="HomePage.xaml" />
3436
<None Remove="Models\fcn-resnet50-12.onnx" />
3537
<None Remove="Models\mosaic.onnx" />
@@ -43,9 +45,12 @@
4345
<None Remove="Samples\ObjectDetector\ObjectDetector.xaml" />
4446
<None Remove="Samples\OpenCVInterop\OpenCVInterop.xaml" />
4547
<None Remove="Samples\ImageSharpInterop\ImageSharpInterop.xaml" />
48+
<None Remove="shaders.hlsl" />
4649
<None Remove="Video.xaml" />
4750
</ItemGroup>
4851
<ItemGroup>
52+
<Content Include="dx_preprocessor_efficient_net.onnx" />
53+
<Content Include="efficientnet-lite4-11.onnx" />
4954
<Content Include="Models\fcn-resnet50-12.onnx">
5055
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
5156
</Content>
@@ -69,6 +74,7 @@
6974
<Content Include="Models\efficientnet-lite4-11.onnx" />
7075
<Content Include="Models\shufflenet-9.onnx" />
7176
<Content Include="Models\squeezenet1.1-7.onnx" />
77+
<Content Include="shaders.hlsl" />
7278
</ItemGroup>
7379
<!-- Large Models -->
7480
<ItemGroup Condition="$(UseLargeModels)">

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/cat.jpg renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/cat.jpg

File renamed without changes.

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/dog.jpg renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/dog.jpg

File renamed without changes.

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/dx_preprocessor_efficient_net.onnx renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/dx_preprocessor_efficient_net.onnx

File renamed without changes.

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/efficientnet-lite4-11.onnx renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/efficientnet-lite4-11.onnx

File renamed without changes.

Samples/WinMLSamplesGallery/WinMLSamplesGalleryNative/hummingbird.jpg renamed to Samples/WinMLSamplesGallery/WinMLSamplesGallery/hummingbird.jpg

File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#pragma once
2+
3+
struct PSInput
4+
{
5+
float4 position : SV_POSITION;
6+
float2 uv : TEXCOORD;
7+
};
8+
9+
Texture2D g_texture : register(t0);
10+
SamplerState g_sampler : register(s0);
11+
12+
PSInput VSMain(float4 position : POSITION, float4 uv : TEXCOORD)
13+
{
14+
PSInput result;
15+
16+
result.position = position;
17+
result.uv = uv;
18+
19+
return result;
20+
}
21+
22+
float4 PSMain(PSInput input) : SV_TARGET
23+
{
24+
return g_texture.Sample(g_sampler, input.uv);
25+
}

0 commit comments

Comments
 (0)