Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xbox_nv2a.cpp: big update to chihiro/xbox 3d graphics [Samuele Zannoli]
- vertex shader and pixel shader refactoring - register combiners support multithreading - corrected reading of vertex attributes - perspective correct vertex attribute interpolation and texture mapping - basic support for texture address modes - secondary color and fog color available as inputs to pixel shader - interpolate all 4 possible texture coordinates - corrected order of vertices when drawing quad list primitives - debug aid to write in a text file the vertex shader disassembly, input and constant registers values To test the update enable the register combiners with the "xbox nv2a_combiners" debugger command
- Loading branch information
58fcf30
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting compile errors on Windows wiht GCC 7.2.0:
GCC 7.2.0 detected
Compiling src/mame/video/xbox_nv2a.cpp...
../../../../../src/mame/video/xbox_nv2a.cpp: In member function 'void vertex_program_simulator::process(int, vertex_nv*, vertex_nv*, int)':
../../../../../src/mame/video/xbox_nv2a.cpp:864:40: error: '((void)& tmp +44)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[2] = par_in[p3_C + 0] > 0 ? pow(fmax(par_in[p3_C + 1], 0), par_in[p3_C + 3]) : 0;
~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +44)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:739:31: error: '((void)& tmp +40)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[2] = par_in[p1_A + 2] + par_in[p3_C + 2];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +40)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:864:40: error: '((void)& tmp +36)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[2] = par_in[p3_C + 0] > 0 ? pow(fmax(par_in[p3_C + 1], 0), par_in[p3_C + 3]) : 0;
~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +36)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: error: '((void)& tmp +32)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
../../../../../src/mame/video/xbox_nv2a.cpp:734:31: error: '((void)& tmp +28)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[3] = par_in[p1_A + 3] * par_in[p2_B + 3];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +28)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:733:31: error: '((void)& tmp +24)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[2] = par_in[p1_A + 2] * par_in[p2_B + 2];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +24)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:732:31: error: '((void)& tmp +20)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[1] = par_in[p1_A + 1] * par_in[p2_B + 1];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +20)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:731:31: error: '((void)& tmp +16)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[0] = par_in[p1_A + 0] * par_in[p2_B + 0];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +16)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:734:31: error: '((void)& tmp +12)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[3] = par_in[p1_A + 3] * par_in[p2_B + 3];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +12)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:733:31: error: '((void)& tmp +8)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[2] = par_in[p1_A + 2] * par_in[p2_B + 2];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +8)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:732:31: error: '((void)& tmp +4)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[1] = par_in[p1_A + 1] * par_in[p2_B + 1];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: '((void)& tmp +4)' was declared here
float tmp[3 * 4];
^~~
../../../../../src/mame/video/xbox_nv2a.cpp:731:31: error: 'tmp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
t_out[0] = par_in[p1_A + 0] * par_in[p2_B + 0];
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../../../../src/mame/video/xbox_nv2a.cpp:505:8: note: 'tmp' was declared here
float tmp[3 * 4];
^~~
cc1plus.exe: all warnings being treated as errors
make[2]: *** [sega.make:1907: ../../../../mingw-gcc/obj/x64/Release/src/mame/video/xbox_nv2a.o] Error 1
make[1]: *** [Makefile:325: sega] Error 2
make: *** [makefile:1081: windows_x64] Error 2