Proper way to access a read-only texture that has no sampler from an hlsl compute shader?

This page summarizes the projects mentioned and recommended in the original post on /r/vulkan

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Vulkan

    Examples and demos for the new Vulkan API

  • BTW, this problem can be reproduced as described below: - clone https://github.com/SaschaWillems/Vulkan.git - build the project and run it with arguments : -v - s hlsl to enable the validation layer and to use hlsl code - run ComputeShader project. The following validation error "Type mismatch on descriptor slot ..." will be shown in the console. - to fix it, as suggested above, you can replace the 3rd line of emboss.comp, sharpen.comp, and edgedetect.comp from: Texture2D inputImage : register(t0); //Creates validation errors to RWTexture2D inputImage : register(u0); //no validation errors (you'll then need to recompile the shaders to spv with a proper hlsl compiler such as Microsoft dxc)

  • DirectXShaderCompiler

    This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang.

  • BTW, this problem can be reproduced as described below: - clone https://github.com/SaschaWillems/Vulkan.git - build the project and run it with arguments : -v - s hlsl to enable the validation layer and to use hlsl code - run ComputeShader project. The following validation error "Type mismatch on descriptor slot ..." will be shown in the console. - to fix it, as suggested above, you can replace the 3rd line of emboss.comp, sharpen.comp, and edgedetect.comp from: Texture2D inputImage : register(t0); //Creates validation errors to RWTexture2D inputImage : register(u0); //no validation errors (you'll then need to recompile the shaders to spv with a proper hlsl compiler such as Microsoft dxc)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts