Giter Club home page Giter Club logo

Comments (9)

cheneym2 avatar cheneym2 commented on June 22, 2024

I've reproduced the bug locally.

from slang.

cheneym2 avatar cheneym2 commented on June 22, 2024

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.

cheneym2 avatar cheneym2 commented on June 22, 2024

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.

cheneym2 avatar cheneym2 commented on June 22, 2024

Regression is in:

5dd27a2 Support combined texture sampler when targeting HLSL. (#3963)
#3963

from slang.

cheneym2 avatar cheneym2 commented on June 22, 2024

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.

jkwak-work avatar jkwak-work commented on June 22, 2024

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.

jkwak-work avatar jkwak-work commented on June 22, 2024

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.

cheneym2 avatar cheneym2 commented on June 22, 2024

@jkwak-work What is the issue that you filed to deal with the regression we uncovered here?

from slang.

cheneym2 avatar cheneym2 commented on June 22, 2024

I found it here: #4196

from slang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.