[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT - When using FFI, trace aborts due to "symbol not in cache"
- From: Benjamin Segovia <segovia.benjamin@...>
- Date: Sun, 1 May 2011 07:21:59 +0000
Also, I just saw that "pairs" seems to abort the trace also but in
this case, the error message given by the trace dump is pretty clear
"NYI: FastFunc pairs". "symbol not in cache" remains however a bit
On Sun, May 1, 2011 at 4:45 AM, Benjamin Segovia
> I am not sure of your answer. The bindings work (i.e. I can call the
> GL functions from luaJIT using the FFI) but the JIT compiler is not
> able to generate the trace as far as I understand. It aborts upon the
> call to glClear
> On Sun, May 1, 2011 at 4:41 AM, Dimiter "malkia" Stanev
> <firstname.lastname@example.org> wrote:
>> Hi Benjamin,
>> I have some FFI bindings for OpenGL, and they work for me: OSX (32-bit,
>> 64-bit), Windows (32-bit, 64-bit) and Ubuntu 11.04 linux (and probably othes
>> - again 32-bit and 64-bit).
>> http://github.com/malkia/ufo - it comes with precompiled luajit, and few
>> other dlls (glfw, anttweakbar, and zeromq).
>> Dimiter "malkia" Stanev
>> On 4/30/11 9:07 PM, Benjamin Segovia wrote:
>>> Hello all,
>>> I am experimenting luaJIT and its FFI. Unfortunately, while trying to
>>> process a rather big loop, the trace aborts on the first C function
>>> call done via the FFI.
>>> Here, I load openGL symbols in "gl" via the FFI. When glClear (see
>>> pasted code) is called, trace aborts with error "symbol not in cache"
>>> here is the code:
>>> function render_system:render()
>>> -- all squares first
>>> local sq = self.render_world.square
>>> for _,square in pairs(sq) do
>>> local c = square.color
>>> local p = square.center
>>> local s = square.size
>>> gl.glVertex3f(p+s, p+s, p+s)
>>> gl.glVertex3f(p+s, p-s, p+s)
>>> gl.glVertex3f(p-s, p-s, p+s)
>>> gl.glVertex3f(p-s, p+s, p+s)
>>> AM I doing something wrong? Or is it the normal behaviour?
>>> I just fetched the last luaJIT version from git HEAD.