Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 51

Thread: R600 Gallium3D LLVM Shader Compiler Hooked Up

  1. #41
    Join Date
    Aug 2009
    Location
    Russe, Bulgaria
    Posts
    420

    Default

    Quote Originally Posted by Pontostroy View Post
    Yes, in the same places.
    I use llvm 3.2_svn20120421, includes only the renaming and a few other little commits.
    Little help really precipitated. Do you use any custom CXXFLAGS to LLVM and/or MESA? -fno-rtti/-frtti ?

  2. #42
    Join Date
    Dec 2007
    Posts
    1,970

    Default

    Quote Originally Posted by Pontostroy View Post
    Yes, in the same places.
    I use llvm 3.2_svn20120421, includes only the renaming and a few other little commits.
    You'll need to use llvm 3.1 for now. The code does not support the changes in 3.2 yet.

  3. #43
    Join Date
    May 2011
    Posts
    29

    Default

    Quote Originally Posted by Drago View Post
    Little help really precipitated. Do you use any custom CXXFLAGS to LLVM and/or MESA? -fno-rtti/-frtti ?
    What does llvm-config --cxxflags output?

  4. #44
    Join Date
    Aug 2009
    Location
    Russe, Bulgaria
    Posts
    420

    Default

    Quote Originally Posted by tstellar View Post
    What does llvm-config --cxxflags output?
    Code:
    [drago@drago mesa]$ llvm-config --cxxflags
    -I/gpgpu-test/include  -fPIC -fvisibility-inlines-hidden -O3 -DNDEBUG  -D_GNU_SOURCE -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
    [drago@drago mesa]$
    This is x86_64 build, with GCC 4.7.0.
    Build type: Release
    Shared library support: Yes

    I didn't want to bruteforce this. Recompiling whole LLVM on E-350 is not fun...

  5. #45
    Join Date
    Aug 2009
    Location
    Russe, Bulgaria
    Posts
    420

    Default

    Quote Originally Posted by tstellar View Post
    What does llvm-config --cxxflags output?
    Never mind, I did it. LLVM needs `-frtti` compiler flag, in CMAKE_CXXFLAGS_[RELEASE/DEBUG/etc.].
    Tom, maybe you could say something about it, in the commit messages and/or blog post.
    Interestengly textures are visible. Doom3 starts, but entering the playable area segfaults, saying something about KILL AMDIL unstruction. I will try to investigate.
    Dumping shaders for glxgears, doesn't ring any bell, yet.

  6. #46
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    3,463

    Default

    KILL should be the discard glsl command.

  7. #47
    Join Date
    Aug 2009
    Location
    Russe, Bulgaria
    Posts
    420

    Default

    Quote Originally Posted by madbiologist View Post
    How new was the mesa you compiled? This committ looks like it might fix this issue:

    http://cgit.freedesktop.org/mesa/mes...9750e194759d89
    Unfortunately not. I got the same error in Doom3:
    Code:
    LLVM ERROR: Cannot select: target intrinsic %llvm.AMDGPU.kill
    doom3.x86_64: /home/drago/doom3-dheng.git/neo/idlib/Heap.h:821: void idDynamicBlockAlloc<type, baseBlockSize, minBlockSize>::FreeInternal(idDynamicBlock<type>*) [with type = unsigned char, int baseBlockSize = 16384, int minBlockSize = 256]: Assertion `block->node == __null' failed.
    Stack dump:
    0.      Running pass 'Function Pass Manager' on module 'tgsi'.
    1.      Running pass 'AMDIL DAG->DAG Pattern Instruction Selection' on function '@mai
    I think, it is generated before Machine Code Generation pass, in SelectionDAG pass.
    Maybe graphics sharders use KILL, different way than OpenCL did. (AMDIL code drop is compute orientated, yet).

  8. #48
    Join Date
    Aug 2009
    Location
    Russe, Bulgaria
    Posts
    420

    Default

    I can't find KILL instruction definition in R600Instructions.td nor in AMDILNodes.td.
    I guess KILL is not ment to be used in OpenCL compute.

  9. #49
    Join Date
    Aug 2009
    Location
    Russe, Bulgaria
    Posts
    420

    Default

    Changing this:
    Code:
    bld_base->op_actions[TGSI_OPCODE_KIL].intr_name = "llvm.AMDGPU.kill";
    into this:
    Code:
    bld_base->op_actions[TGSI_OPCODE_KIL].intr_name = "llvm.AMDGPU.kilp";
    Game is playable, but with model artifacts. I believe they are not related to this change.
    From this definition in R600Instructions.td, I conclude that above patching is legit:
    Code:
    def KILP : Pat <
      (int_AMDGPU_kilp),
      (MASK_WRITE (KILLGT (f32 ONE), (f32 ZERO)))
    >;
    Probably the same as KILL, but with small overhead.
    Last edited by Drago; 04-28-2012 at 09:27 AM.

  10. #50
    Join Date
    May 2011
    Posts
    29

    Default

    Quote Originally Posted by Drago View Post
    Never mind, I did it. LLVM needs `-frtti` compiler flag, in CMAKE_CXXFLAGS_[RELEASE/DEBUG/etc.].
    Tom, maybe you could say something about it, in the commit messages and/or blog post.
    Interestengly textures are visible. Doom3 starts, but entering the playable area segfaults, saying something about KILL AMDIL unstruction. I will try to investigate.
    Dumping shaders for glxgears, doesn't ring any bell, yet.
    I usually configure LLVM with autoconf instead of CMake, and the -fno-rtti flag is added to the CXXFLAGS by default, so maybe there are some difference between CMake and configure. It seems like the real problem is that in the absence of -frtti and -fno-rtti flags, llvm builds without rtti, but Mesa builds with rtti. I think the best solution might be to always use -fno-rtti in Mesa.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •