diff options
| author | ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 2024-07-02 13:35:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-02 13:35:49 -0400 |
| commit | d5d03d1510f45f5ed7864031244713d87fc82b87 (patch) | |
| tree | e0391686ca3b06406e497c4e7e7f90172355e4cf /source/slang/slang-stdlib-textures.cpp | |
| parent | bd01bd3f4b8eecbfb924b8eb4090694e44e8166c (diff) | |
Emit errors when invalid capabilities are used (#4510)
* Fix invalid capabilities being allowed
fixes: #4506
fixes: #4508
1. As per #4506, no longer allow invalid `[require(...)]`
2. As per #4508, no longer allow mismatch between `case` and `require` of a calling function
3. Fixes incorrect hlsl.meta capabilities
4. Added a ref to the parent function/decl for when erroring with capabilities to help debug meta.slang files for when weird source locations are generated.
* rename vars and copy lambdas by value
* fix some more capabilities
* incorrect capabilities on a texture test
* push capabilities fix
note: seperated capabilities for glsl,spirv,cuda,hlsl since not all functions support all targets (source of capability error)
* fix cmd line arg by using `xslang` to passthrough to slangc
* let auto-infer run for certain capabilities to reduce simple mistakes
---------
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-stdlib-textures.cpp')
| -rw-r--r-- | source/slang/slang-stdlib-textures.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-stdlib-textures.cpp b/source/slang/slang-stdlib-textures.cpp index 380ed1677..dd4df7d9c 100644 --- a/source/slang/slang-stdlib-textures.cpp +++ b/source/slang/slang-stdlib-textures.cpp @@ -453,7 +453,7 @@ void TextureTypeInfo::writeGetDimensionFunctions() sb << " __glsl_version(450)\n"; sb << " __glsl_extension(GL_EXT_samplerless_texture_functions)\n"; - sb << " [require(glsl_hlsl_metal_spirv, texture_sm_4_1)]\n"; + sb << " [require(cpp_glsl_hlsl_metal_spirv, texture_sm_4_1)]\n"; writeFunc( "void", "GetDimensions", |
