GithubHelp home page GithubHelp logo

Comments (5)

kuhar avatar kuhar commented on July 30, 2024

Not whether this input spv is valid.

The crash happens when translating the last OpExtInst:

               OpCapability Shader
          %1 = OpExtInstImport "GLSL.std.450"
               OpMemoryModel Logical GLSL450
               OpEntryPoint Fragment %main "main" %_GLF_color
               OpExecutionMode %main OriginUpperLeft
               OpSource ESSL 310
               OpName %main "main"
               OpName %temp "temp"
               OpName %_GLF_color "_GLF_color"
               OpDecorate %_GLF_color Location 0
       %void = OpTypeVoid
          %6 = OpTypeFunction %void
      %float = OpTypeFloat 32
    %v4float = OpTypeVector %float 4
    %float_1 = OpConstant %float 1
         %10 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
    %float_0 = OpConstant %float 0
         %13 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
                  ...
         %17 = OpExtInst %v4float %1 Modf %13 %_GLF_color     <====
               OpReturn
               OpFunctionEnd

The second argument to Modf is in address space 65, instead of 5. Due to type mismatch

This seems similar to the issue reported here: KhronosGroup/SPIRV-Cross#1123.

If the input spv is valid, would it be enough to just introduce an address space cast before passing the %_GLF_color to Modf?

from llpc.

trenouf avatar trenouf commented on July 30, 2024

I wonder if this is fixed by my outstanding PR #169, which reimplements Modf with a separate ModfStruct and store in the spir-v reader.

I guess the problem at the moment might be that the modf is a library function, so it eventually expands to have a store, but not in time for LowerGlobal to spot that it is a store to an output.

from llpc.

MarcinKantochAMD avatar MarcinKantochAMD commented on July 30, 2024

I ran the test today and it is passing on our LLPC stack.

from llpc.

MarcinKantochAMD avatar MarcinKantochAMD commented on July 30, 2024

Sorry Paul. I was not aware that your issues relate to Debug build. I was testing with a Release build.

from llpc.

paulthomson avatar paulthomson commented on July 30, 2024

Appears to be fixed!

from llpc.

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.