This is x86_64 build, with GCC 4.7.0.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]$
Build type: Release
Shared library support: Yes
I didn't want to bruteforce this. Recompiling whole LLVM on E-350 is not fun...
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.
KILL should be the discard glsl command.
I think, it is generated before Machine Code Generation pass, in SelectionDAG pass.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
Maybe graphics sharders use KILL, different way than OpenCL did. (AMDIL code drop is compute orientated, yet).
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.
into this:Code:bld_base->op_actions[TGSI_OPCODE_KIL].intr_name = "llvm.AMDGPU.kill";
Game is playable, but with model artifacts. I believe they are not related to this change.Code:bld_base->op_actions[TGSI_OPCODE_KIL].intr_name = "llvm.AMDGPU.kilp";
From this definition in R600Instructions.td, I conclude that above patching is legit:
Probably the same as KILL, but with small overhead.Code:def KILP : Pat < (int_AMDGPU_kilp), (MASK_WRITE (KILLGT (f32 ONE), (f32 ZERO))) >;
Last edited by Drago; 04-28-2012 at 11:27 AM.