On Thu, Feb 11, 2010 at 9:32 PM, Michael Menegakis <[email protected]> wrote:
> I wonder if there are any endianess issues in the x64 compiler or

32-bit and 64-bit x86 are both little endian. So that doens't make any sense.

> assembler or also any issues with volatile registers.

Quite possibly, since there is some x86 assembly in the VM.

>
> 2010/2/10 Matthias Bentrup <[email protected]>:
>> You should also check that the refdef_t parameter in RenderScene is passed
>> correctly. Generally the passing of structure pointers can be a problem if
>> they are compiled on different ABIs as the layout / alignment rules may be
>> different. So at least check that the sizeof(refdef_t) is identical in the
>> engine and the qvm (add a debug print somewhere).
>>
>> 2010/2/10 Michael Menegakis <[email protected]>
>>>
>>>
>>> 2010/2/9 Michael Menegakis <[email protected]>
>>>>
>>>> 2010/2/9 Michael Menegakis <[email protected]>
>>>>>
>>>>> The secret was to
>>>>>
>>>>> a) replace longs with int64_t (or intptr_t if appropriate).
>>>>>
>>>>> but also
>>>>>
>>>>> b) Call (all) functions (found) inside assembly code with the
>>>>> __attribute___ ((sysv_abi))___
>>>>>
>>>>> (I practically did it by putting a CROSSCALL in front of their
>>>>> declarations
>>>>>
>>>>> with CROSSCALL being,
>>>>>
>>>>> #ifdef    WIN64
>>>>>     #define CROSSCALL __attribute__ ((sysv_abi))
>>>>> #elif     WIN32
>>>>>     #define CROSSCALL __attribute__ ((ms_abi))
>>>>> #else
>>>>>     #define CROSSCALL __attribute__ ((sysv_abi))
>>>>> #endif
>>>>
>>>> It terms of functionality,  it loads into the game with 2D fine (e.g.
>>>> console, even fonts) but it does not appear to render 3D properly, e.g. 
>>>> even
>>>> the 'Quake III Arena' 3D graphic on UI doesn't work.
>>>
>>> Any idea how to debug it?
>>>
>>> kevlarman at irc had the idea to determine if trap_R_AddRefEntityToScene
>>> gets sane values. Apparently RE_AddRefEntityToScene gets the origin correct
>>> on all 3 vm types.
>>>
>>> I can see *something* in the scene. There's a distorted 'horizon', there's
>>> some color; it's like the 'camera' is completely off.
>>>
>>> 2d, (console, printing of fonts by cl_scrn.c, etc., even scores of cg.),
>>> audio, are, rest gameplay, are fine.
>>>
>>> _______________________________________________
>>> ioquake3 mailing list
>>> [email protected]
>>> http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
>>> By sending this message I agree to love ioquake3 and libsdl.
>>
>>
>> _______________________________________________
>> ioquake3 mailing list
>> [email protected]
>> http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
>> By sending this message I agree to love ioquake3 and libsdl.
>>
> _______________________________________________
> ioquake3 mailing list
> [email protected]
> http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
> By sending this message I agree to love ioquake3 and libsdl.
_______________________________________________
ioquake3 mailing list
[email protected]
http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
By sending this message I agree to love ioquake3 and libsdl.

Reply via email to