瀏覽代碼

Source also should be storage tex

Heedong Arkiny Lee 5 年之前
父節點
當前提交
278ac2b1ad
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      Samples/ComputeShader/ComputeShader.cpp

+ 1
- 1
Samples/ComputeShader/ComputeShader.cpp 查看文件

@@ -228,7 +228,7 @@ public:
228 228
             texDesc.mipmapLevels = 1;
229 229
             texDesc.sampleCount = 1;
230 230
             texDesc.arrayLength = 1;
231
-            texDesc.usage = DKTexture::UsageCopyDestination | DKTexture::UsageSampled;
231
+            texDesc.usage = DKTexture::UsageStorage | DKTexture::UsageShaderRead | DKTexture::UsageCopyDestination | DKTexture::UsageSampled;
232 232
             DKObject<DKTexture> tex = device->CreateTexture(texDesc);
233 233
             if (tex)
234 234
             {