Comments (9)
I've reproduced the bug locally.
from slang.
Quick repro:
C:\Users\acheney\Downloads\VK-GL-CTS_WithSlang-0.0.3-win64\VK-GL-CTS_WithSlang-0.0.3-win64>deqp-vk.exe --deqp-case "dEQP-VK.glsl.texture_functions.textureclamp.sparse_samplercube_bias_fixed*"
Writing test log into TestResults.qpa
dEQP Core vulkan-cts-1.3.8.0-68-gca98e86bcb8d06f8891758fa4a0e416e2d43117b (0xca98e86b) starting..
target implementation = 'Default'
Test case 'dEQP-VK.glsl.texture_functions.textureclamp.sparse_samplercube_bias_fixed_fragment'..
spawinAndWaitTestServerThread: #1 thread is active
#2 spawinAndWaitTestServerThread: Thread launching test-server
#3 spawinAndWaitTestServerThread: thread succeded to launch server
Failed to generate SPIRV ouptput from test-server results: 80004005
InternalError (Compiling GLSL to SPIR-V failed at vkPrograms.cpp:701)
DONE!
Test run totals:
Passed: 0/1 (0.0%)
Failed: 1/1 (100.0%)
Not supported: 0/1 (0.0%)
Warnings: 0/1 (0.0%)
Waived: 0/1 (0.0%)
C:\Users\acheney\Downloads\VK-GL-CTS_WithSlang-0.0.3-win64\VK-GL-CTS_WithSlang-0.0.3-win64>
from slang.
From test-server.exe, I see a failing call to compile this shader:
#version 450
#extension GL_ARB_sparse_texture2 : require
#extension GL_ARB_sparse_texture_clamp : require
layout(location = 0) out mediump vec4 o_color;
layout(location = 0) in highp vec3 v_texCoord;
layout(location = 1) in highp float v_lodBias;
layout(set = 0, binding = 0) uniform highp samplerCube u_sampler;
layout(set = 0, binding = 1) uniform buf0 { highp vec4 u_scale; };
layout(set = 0, binding = 2) uniform buf1 { highp vec4 u_bias; };
void main()
{
vec4 texel;
int success = sparseTextureClampARB(u_sampler, v_texCoord, float(4), texel, v_lodBias);
if (sparseTexelsResidentARB(success))
o_color = vec4(texel * u_scale + u_bias);
else
o_color = vec4(0.54117647058, 0.16862745098, 0.8862745098, 1.0);
}
Running the same through slangc shows this error:
c:\Users\acheney\Documents\git\slang>build\Release\bin\slangc.exe test.slang.frag -target spirv -stage fragment -entry main -allow-glsl
test.slang.frag(14): error 30015: undefined identifier 'sparseTextureClampARB'.
int success = sparseTextureClampARB(u_sampler, v_texCoord, float(4), texel, v_lodBias);
^~~~~~~~~~~~~~~~~~~~~
test.slang.frag(15): error 30015: undefined identifier 'sparseTexelsResidentARB'.
if (sparseTexelsResidentARB(success))
^~~~~~~~~~~~~~~~~~~~~~~
c:\Users\acheney\Documents\git\slang>
from slang.
Regression is in:
5dd27a2 Support combined texture sampler when targeting HLSL. (#3963)
#3963
from slang.
C:\Users\acheney\Downloads\VK-GL-CTS_WithSlang-0.0.3-win64\VK-GL-CTS_WithSlang-0.0.3-win64>type test.slang.vert
#version 450 core
layout(location = 0) in highp vec4 a_position;
layout(location = 4) in highp vec2 a_in0;
layout(location = 0) out mediump vec4 v_color;
layout(set = 0, binding = 0) uniform highp isampler2D u_sampler;
layout(set = 0, binding = 1) uniform buf0 { highp vec4 u_scale; };
layout(set = 0, binding = 2) uniform buf1 { highp vec4 u_bias; };
out gl_PerVertex {
vec4 gl_Position;
};
void main()
{
gl_Position = a_position;
v_color = vec4(texture(u_sampler, a_in0))*u_scale + u_bias;
}
C:\Users\acheney\Downloads\VK-GL-CTS_WithSlang-0.0.3-win64\VK-GL-CTS_WithSlang-0.0.3-win64>slangc test.slang.vert
test.slang.vert(15): error 39999: no overload for 'texture' applicable to arguments of type (Sampler2D<vector<int,4>>, vector<float,2>)
v_color = vec4(texture(u_sampler, a_in0))*u_scale + u_bias;
^
glsl.meta.slang(1723): note 39999: candidate: public func texture(__TextureImpl<float, __Shape2D, 1, 0, 0, 0, 1, 1, 0>, float4) -> float
public float texture(sampler2DArrayShadow sampler, vec4 p)
^~~~~~~
glsl.meta.slang(1710): note 39999: candidate: public func texture(__TextureImpl<float, __Shape1D, 1, 0, 0, 0, 1, 1, 0>, float3) -> float
public float texture(sampler1DArrayShadow sampler, vec3 p)
^~~~~~~
glsl.meta.slang(1697): note 39999: candidate: public func texture(__TextureImpl<float, __ShapeCube, 0, 0, 0, 0, 1, 1, 0>, float4) -> float
public float texture(samplerCubeShadow sampler, vec4 p)
^~~~~~~
glsl.meta.slang(1684): note 39999: candidate: public func texture(__TextureImpl<float, __Shape2D, 0, 0, 0, 0, 1, 1, 0>, float3) -> float
public float texture(sampler2DShadow sampler, vec3 p)
^~~~~~~
glsl.meta.slang(1671): note 39999: candidate: public func texture(__TextureImpl<float, __Shape1D, 0, 0, 0, 0, 1, 1, 0>, float3) -> float
public float texture(sampler1DShadow sampler, vec3 p)
^~~~~~~
glsl.meta.slang(1638): note 39999: candidate: public func texture<float, 4, __Shape2D, 0, 0, 0>(Sampler2D<vector<float,4>>, float2) -> float4
public vector<T,4> texture(__TextureImpl<
^~~~~~~
glsl.meta.slang(1624): note 39999: candidate: public func texture<float, 4>(Sampler1D<vector<float,4>>, float) -> float4
public vector<T,4> texture(Sampler1D<vector<T,N>> sampler, float p)
^~~~~~~
C:\Users\acheney\Downloads\VK-GL-CTS_WithSlang-0.0.3-win64\VK-GL-CTS_WithSlang-0.0.3-win64>
from slang.
Looking at the error message, the given code is trying to use int4 type sampler and it couldn't find one. The closest one showing is float4 sampler.
If this is not going to be an easy fix, we can simply disable this test from the CTS test list until we have a proper fix. I assume that we run only a few tests out of all CTS test.
from slang.
Or if you can make a simpler repro case, please create a new issue and assign it to me.
EDIT: I forgot that one of the comments above already shows the repro example. I will give a try.
from slang.
@jkwak-work What is the issue that you filed to deal with the regression we uncovered here?
from slang.
I found it here: #4196
from slang.
Related Issues (20)
- [SPIRV] Resulting matrix vector product code looks unoptimized HOT 2
- Vertex entrypoints missing from capability system? HOT 3
- `GetAttributeAtVertex` is not correctly implemented for SPIRV. HOT 1
- Add compile flag to allow register() for Vulkan HOT 2
- slang-test failures with the latest Vulkan SDK 1.3.283.0
- Sanity check for compiling multiple shaders in a single file to SPIR-V library with Slang API HOT 1
- Disable all failing metal tests and enable full testing on CI. HOT 2
- Passthrough linking of shader-modules with embedded DXIL
- Implement `InputPatch` and `OutputPatch` for spirv.
- There is no way to keep unused descriptor bindings when compiling to SpirV HOT 4
- `Optional` type doesn't work in generic function.
- Validation error, "Flat decoration on target XX storage class must be Input or Output" HOT 5
- Capability System: Simplify capabilities before printing HOT 3
- Crash on invalid entry point parameter
- Request for a generic descriptor indexing intrinsic HOT 16
- `[[vk::builtin("DrawIndex")]]` is not supported. HOT 2
- Use ExplicitLod instructions for texture sampling in vertex shader HOT 2
- textureQueryLod needs to be used with ImageQuery capability
- GLSL matrix row/column major-ness issue HOT 2
- CTS test failures with -emit-spirv-directly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slang.