Search
lxdream.org :: lxdream :: r1151:e1848ca9b5b1
lxdream 0.9.1
released Jun 29
Download Now
changeset1151:e1848ca9b5b1
parent1150:1038800cecd8
child1152:6464d890cc9e
authornkeynes
dateWed Dec 08 18:33:23 2010 +1000 (8 years ago)
Updated pt_BR translation from Arthonis
po/pt_BR.po
src/Makefile.am
src/Makefile.in
src/pvr2/glrender.c
src/pvr2/scene.h
src/pvr2/tileiter.h
src/pvr2/untile.c
src/tools/genglsl.c
test/pvr.c
1.1 --- a/po/pt_BR.po Thu Nov 11 17:51:37 2010 +1000
1.2 +++ b/po/pt_BR.po Wed Dec 08 18:33:23 2010 +1000
1.3 @@ -8,37 +8,42 @@
1.4 "Project-Id-Version: lxdream 0.8.3\n"
1.5 "Report-Msgid-Bugs-To: \n"
1.6 "POT-Creation-Date: 2009-06-27 20:19+1000\n"
1.7 -"PO-Revision-Date: 2009-04-03 11:05-0300\n"
1.8 +"PO-Revision-Date: 2010-11-30 10:17-0300\n"
1.9 "Last-Translator: Gabriel Tillmann <gtillmann@gmail.com>\n"
1.10 "Language-Team: PT <trans-pt@lxdream.org>\n"
1.11 "MIME-Version: 1.0\n"
1.12 "Content-Type: text/plain; charset=utf-8\n"
1.13 "Content-Transfer-Encoding: 8bit\n"
1.14
1.15 -#: src/cocoaui/cocoa_ctrl.m:325 src/gtkui/gtk_ctrl.c:494
1.16 -#, fuzzy, c-format
1.17 +#: src/cocoaui/cocoa_ctrl.m:325
1.18 +#: src/gtkui/gtk_ctrl.c:494
1.19 +#, c-format
1.20 msgid "Port %c."
1.21 -msgstr "Slot %d."
1.22 +msgstr "Porta %c."
1.23
1.24 -#: src/cocoaui/cocoa_ctrl.m:327 src/gtkui/gtk_ctrl.c:523
1.25 +#: src/cocoaui/cocoa_ctrl.m:327
1.26 +#: src/gtkui/gtk_ctrl.c:523
1.27 #, c-format
1.28 msgid "VMU %d."
1.29 -msgstr ""
1.30 +msgstr "VMU %d."
1.31
1.32 #: src/cocoaui/cocoaui.m:447
1.33 #, c-format
1.34 msgid "Running (%2.4f%%)"
1.35 msgstr "Rodando (%2.4f%%)"
1.36
1.37 -#: src/cocoaui/cocoa_win.m:193 src/gtkui/gtk_win.c:356
1.38 +#: src/cocoaui/cocoa_win.m:193
1.39 +#: src/gtkui/gtk_win.c:356
1.40 msgid "(Press <ctrl><alt> to release grab)"
1.41 msgstr "(Pressione <Ctrl><alt> para desprender)"
1.42
1.43 -#: src/cocoaui/cocoa_win.m:205 src/gtkui/gtk_win.c:366
1.44 +#: src/cocoaui/cocoa_win.m:205
1.45 +#: src/gtkui/gtk_win.c:366
1.46 msgid "Running"
1.47 msgstr "Rodando"
1.48
1.49 -#: src/cocoaui/cocoa_win.m:208 src/gtkui/gtk_win.c:366
1.50 +#: src/cocoaui/cocoa_win.m:208
1.51 +#: src/gtkui/gtk_win.c:366
1.52 msgid "Stopped"
1.53 msgstr "Parado"
1.54
1.55 @@ -60,7 +65,7 @@
1.56
1.57 #: src/config.c:48
1.58 msgid "VMU path"
1.59 -msgstr ""
1.60 +msgstr "Caminho do VMU"
1.61
1.62 #: src/config.c:49
1.63 msgid "Bootstrap IP.BIN"
1.64 @@ -71,26 +76,23 @@
1.65 msgstr "Dispositivo Serial"
1.66
1.67 #: src/dreamcast.c:203
1.68 -msgid ""
1.69 -"No program is loaded, and no BIOS is configured (required to boot a CD "
1.70 -"image). To continue, either load a binary program, or set the path to your "
1.71 -"BIOS file in the Path Preferences"
1.72 -msgstr ""
1.73 +msgid "No program is loaded, and no BIOS is configured (required to boot a CD image). To continue, either load a binary program, or set the path to your BIOS file in the Path Preferences"
1.74 +msgstr "Nenhum programa foi carregado, e a BIOS não está configurada (requisito para arrancar uma imagem de CD). Para continuar, ou carregue um programa binário, ou configure o Caminho do seu arquivo de BIOS nas Preferências"
1.75
1.76 #: src/dreamcast.c:338
1.77 #, c-format
1.78 msgid "File is not a %s save state"
1.79 -msgstr ""
1.80 +msgstr "O arquivo %s não é um estado salvo"
1.81
1.82 #: src/dreamcast.c:343
1.83 #, c-format
1.84 msgid "Unsupported %s save state version"
1.85 -msgstr ""
1.86 +msgstr "Versão de estado salvo %s não suportada"
1.87
1.88 #: src/dreamcast.c:348
1.89 #, c-format
1.90 msgid "%s save state is corrupted (bad module count)"
1.91 -msgstr ""
1.92 +msgstr "O estado salvo %s está corrompido (Má contagem de módulo)"
1.93
1.94 #: src/drivers/audio_alsa.c:35
1.95 msgid "Audio output device"
1.96 @@ -118,7 +120,7 @@
1.97
1.98 #: src/drivers/audio_sdl.c:125
1.99 msgid "SDL sound driver"
1.100 -msgstr ""
1.101 +msgstr "Driver de Som SDL"
1.102
1.103 #. Sense key 2 == Not Ready (ie temporary failure). Just ignore and
1.104 #. * consider the drive empty for now, but warn about any other errors
1.105 @@ -126,7 +128,7 @@
1.106 #: src/drivers/cd_mmc.c:182
1.107 #, c-format
1.108 msgid "Unable to read disc table of contents (error %04x)"
1.109 -msgstr ""
1.110 +msgstr "Impossível ler a tabela de conteúdo do disco (erro %04x) "
1.111
1.112 #: src/drivers/video_gtk.c:132
1.113 msgid "GTK-based OpenGL driver"
1.114 @@ -140,7 +142,8 @@
1.115 msgid "OS X Cocoa GUI-based OpenGL driver"
1.116 msgstr "Driver GUI OS X Cocoa baseado em OpenGL "
1.117
1.118 -#: src/gdlist.c:187 src/gdlist.c:210
1.119 +#: src/gdlist.c:187
1.120 +#: src/gdlist.c:210
1.121 msgid "Empty"
1.122 msgstr "Vazio"
1.123
1.124 @@ -152,11 +155,13 @@
1.125 msgid "Load state..."
1.126 msgstr "Carregar stado..."
1.127
1.128 -#: src/gtkui/gtkcb.c:184 src/gtkui/gtkcb.c:217
1.129 +#: src/gtkui/gtkcb.c:184
1.130 +#: src/gtkui/gtkcb.c:217
1.131 msgid "lxDream Save State (*.dst)"
1.132 msgstr "lxDream Save State (*.dst)"
1.133
1.134 -#: src/gtkui/gtkcb.c:297 src/gtkui/gtk_dump.c:69
1.135 +#: src/gtkui/gtkcb.c:297
1.136 +#: src/gtkui/gtk_dump.c:69
1.137 msgid "Memory dump"
1.138 msgstr "Dump de memória"
1.139
1.140 @@ -172,10 +177,12 @@
1.141 msgid "No address selected, so can't run to it"
1.142 msgstr "Sem endereço selecionado, então impossível correr a ele"
1.143
1.144 -#: src/gtkui/gtk_ctrl.c:80 src/gtkui/gtk_ctrl.c:109 src/gtkui/gtk_hotkeys.c:50
1.145 +#: src/gtkui/gtk_ctrl.c:80
1.146 +#: src/gtkui/gtk_ctrl.c:109
1.147 +#: src/gtkui/gtk_hotkeys.c:50
1.148 #: src/gtkui/gtk_hotkeys.c:79
1.149 msgid "<press key>"
1.150 -msgstr "<Precione tecla>"
1.151 +msgstr "<Pressione tecla>"
1.152
1.153 #: src/gtkui/gtk_ctrl.c:209
1.154 msgid "Controller Configuration"
1.155 @@ -187,24 +194,24 @@
1.156
1.157 #: src/gtkui/gtk_ctrl.c:252
1.158 msgid "Load VMU"
1.159 -msgstr ""
1.160 +msgstr "Carregar VMU"
1.161
1.162 #: src/gtkui/gtk_ctrl.c:266
1.163 msgid "Create VMU"
1.164 -msgstr ""
1.165 +msgstr "Criar VMU"
1.166
1.167 -#: src/gtkui/gtk_ctrl.c:337 src/gtkui/gtk_ctrl.c:355
1.168 +#: src/gtkui/gtk_ctrl.c:337
1.169 +#: src/gtkui/gtk_ctrl.c:355
1.170 msgid "<empty>"
1.171 msgstr "<Vazio>"
1.172
1.173 #: src/gtkui/gtk_ctrl.c:364
1.174 -#, fuzzy
1.175 msgid "Load VMU..."
1.176 -msgstr "Carregar stado..."
1.177 +msgstr "Carregar VMU..."
1.178
1.179 #: src/gtkui/gtk_ctrl.c:365
1.180 msgid "Create VMU..."
1.181 -msgstr ""
1.182 +msgstr "Criar VMU..."
1.183
1.184 #: src/gtkui/gtk_ctrl.c:559
1.185 msgid "Controller Settings"
1.186 @@ -267,9 +274,8 @@
1.187 msgstr "Configurações de GD-Rom"
1.188
1.189 #: src/gtkui/gtk_hotkeys.c:186
1.190 -#, fuzzy
1.191 msgid "Hotkey Settings"
1.192 -msgstr "Configurações de diretórios"
1.193 +msgstr "Configurações de Hotkeys"
1.194
1.195 #: src/gtkui/gtk_mmio.c:109
1.196 msgid "Address"
1.197 @@ -299,7 +305,8 @@
1.198 msgid "Close"
1.199 msgstr "Fechar"
1.200
1.201 -#: src/gtkui/gtk_path.c:34 src/gtkui/gtk_path.c:57
1.202 +#: src/gtkui/gtk_path.c:34
1.203 +#: src/gtkui/gtk_path.c:57
1.204 msgid "Select file"
1.205 msgstr "Selecionar arquivo"
1.206
1.207 @@ -325,7 +332,7 @@
1.208
1.209 #: src/gtkui/gtkui.c:73
1.210 msgid "Load and run a program binary"
1.211 -msgstr "Carregar e Correr Um programa Binário"
1.212 +msgstr "Carregar e Rodar Um programa Binário"
1.213
1.214 #: src/gtkui/gtkui.c:74
1.215 msgid "_Reset"
1.216 @@ -348,49 +355,44 @@
1.217 msgstr "Continuar"
1.218
1.219 #: src/gtkui/gtkui.c:77
1.220 -#, fuzzy
1.221 msgid "L_oad State..."
1.222 -msgstr "_Carregar Estado..."
1.223 +msgstr "C_arregar Estado..."
1.224
1.225 #: src/gtkui/gtkui.c:77
1.226 msgid "Load an lxdream save state"
1.227 msgstr "Carregar estado do lxdream"
1.228
1.229 #: src/gtkui/gtkui.c:78
1.230 -#, fuzzy
1.231 msgid "S_ave State..."
1.232 -msgstr "_Salvar Estado..."
1.233 +msgstr "S_alvar Estado..."
1.234
1.235 #: src/gtkui/gtkui.c:78
1.236 msgid "Create an lxdream save state"
1.237 msgstr "Criar estado do lxdream"
1.238
1.239 #: src/gtkui/gtkui.c:79
1.240 -#, fuzzy
1.241 msgid "_Load Quick State"
1.242 -msgstr "_Carregar Estado..."
1.243 +msgstr "_Carregar Estado Rápido..."
1.244
1.245 #: src/gtkui/gtkui.c:79
1.246 -#, fuzzy
1.247 msgid "Load the current quick save state"
1.248 -msgstr "Carregar estado do lxdream"
1.249 +msgstr "Carregar estado Rápido atual."
1.250
1.251 #: src/gtkui/gtkui.c:80
1.252 -#, fuzzy
1.253 msgid "_Save Quick State..."
1.254 -msgstr "_Salvar Estado..."
1.255 +msgstr "_Salvar Estado Rápido..."
1.256
1.257 #: src/gtkui/gtkui.c:80
1.258 msgid "Save to the current quick save state"
1.259 -msgstr ""
1.260 +msgstr "Salvar para o atual estado salvo rápido"
1.261
1.262 #: src/gtkui/gtkui.c:81
1.263 msgid "Select _Quick State"
1.264 -msgstr ""
1.265 +msgstr "Selecionar _Estado Rápido"
1.266
1.267 #: src/gtkui/gtkui.c:81
1.268 msgid "Set quick save state"
1.269 -msgstr ""
1.270 +msgstr "Escolher estado salvo rápido"
1.271
1.272 #: src/gtkui/gtkui.c:82
1.273 msgid "E_xit"
1.274 @@ -457,14 +459,12 @@
1.275 msgstr "Configurar saída de vídeo"
1.276
1.277 #: src/gtkui/gtkui.c:91
1.278 -#, fuzzy
1.279 msgid "_Hotkeys..."
1.280 -msgstr "_Controles..."
1.281 +msgstr "_Hotkeys..."
1.282
1.283 #: src/gtkui/gtkui.c:91
1.284 -#, fuzzy
1.285 msgid "Configure hotkeys"
1.286 -msgstr "Configurar Controles"
1.287 +msgstr "Configurar hotkeys"
1.288
1.289 #: src/gtkui/gtkui.c:92
1.290 msgid "_About..."
1.291 @@ -537,12 +537,12 @@
1.292 #: src/gtkui/gtkui.c:257
1.293 #, c-format
1.294 msgid "State _%d"
1.295 -msgstr ""
1.296 +msgstr "Estado_%d"
1.297
1.298 #: src/gtkui/gtkui.c:259
1.299 #, c-format
1.300 msgid "Use quick save state %d"
1.301 -msgstr ""
1.302 +msgstr "Usar estado salvo rápido %d"
1.303
1.304 #: src/gtkui/gtkui.c:373
1.305 msgid "Debugger"
1.306 @@ -558,68 +558,67 @@
1.307
1.308 #: src/hotkeys.c:40
1.309 msgid "Resume emulation"
1.310 -msgstr ""
1.311 +msgstr "Continuar emulação"
1.312
1.313 #: src/hotkeys.c:41
1.314 msgid "Stop emulation"
1.315 -msgstr ""
1.316 +msgstr "Parar emulação"
1.317
1.318 #: src/hotkeys.c:42
1.319 -#, fuzzy
1.320 msgid "Reset emulator"
1.321 -msgstr "Reiniciar dreamcast"
1.322 +msgstr "Reiniciar o emulador"
1.323
1.324 #: src/hotkeys.c:43
1.325 msgid "Exit emulator"
1.326 -msgstr ""
1.327 +msgstr "Sair do emulador"
1.328
1.329 #: src/hotkeys.c:44
1.330 msgid "Save current quick save"
1.331 -msgstr ""
1.332 +msgstr "Salvar atual estado rápido"
1.333
1.334 #: src/hotkeys.c:45
1.335 msgid "Load current quick save"
1.336 -msgstr ""
1.337 +msgstr "Carregar atual estado rápido"
1.338
1.339 #: src/hotkeys.c:46
1.340 msgid "Select quick save state 0"
1.341 -msgstr ""
1.342 +msgstr "Selecionar estado salvo rápido 0"
1.343
1.344 #: src/hotkeys.c:47
1.345 msgid "Select quick save state 1"
1.346 -msgstr ""
1.347 +msgstr "Selecionar estado salvo rápido 1"
1.348
1.349 #: src/hotkeys.c:48
1.350 msgid "Select quick save state 2"
1.351 -msgstr ""
1.352 +msgstr "Selecionar estado salvo rápido 2"
1.353
1.354 #: src/hotkeys.c:49
1.355 msgid "Select quick save state 3"
1.356 -msgstr ""
1.357 +msgstr "Selecionar estado salvo rápido 3"
1.358
1.359 #: src/hotkeys.c:50
1.360 msgid "Select quick save state 4"
1.361 -msgstr ""
1.362 +msgstr "Selecionar estado salvo rápido 4"
1.363
1.364 #: src/hotkeys.c:51
1.365 msgid "Select quick save state 5"
1.366 -msgstr ""
1.367 +msgstr "Selecionar estado salvo rápido 5"
1.368
1.369 #: src/hotkeys.c:52
1.370 msgid "Select quick save state 6"
1.371 -msgstr ""
1.372 +msgstr "Selecionar estado salvo rápido 6"
1.373
1.374 #: src/hotkeys.c:53
1.375 msgid "Select quick save state 7"
1.376 -msgstr ""
1.377 +msgstr "Selecionar estado salvo rápido 7"
1.378
1.379 #: src/hotkeys.c:54
1.380 msgid "Select quick save state 8"
1.381 -msgstr ""
1.382 +msgstr "Selecionar estado salvo rápido 8"
1.383
1.384 #: src/hotkeys.c:55
1.385 msgid "Select quick save state 9"
1.386 -msgstr ""
1.387 +msgstr "Selecionar estado salvo rápido 9"
1.388
1.389 #: src/main.c:87
1.390 msgid "Run the AICA SPU only, with the supplied program"
1.391 @@ -638,17 +637,16 @@
1.392 msgstr "Iniciar no modo debbugador"
1.393
1.394 #: src/main.c:91
1.395 -#, fuzzy
1.396 msgid "Start in fullscreen mode"
1.397 -msgstr "Iniciar no modo debbugador"
1.398 +msgstr "Iniciar no modo Tela cheia"
1.399
1.400 #: src/main.c:92
1.401 msgid "Start GDB remote server on PORT for SH4"
1.402 -msgstr ""
1.403 +msgstr "Iniciar Servidor remoto do GDB em PORT para SH4"
1.404
1.405 #: src/main.c:93
1.406 msgid "Start GDB remote server on PORT for ARM"
1.407 -msgstr ""
1.408 +msgstr "Iniciar Servidor remoto do GDB em PORT para ARM"
1.409
1.410 #: src/main.c:94
1.411 msgid "Display this usage information"
1.412 @@ -698,19 +696,23 @@
1.413 msgid "Disable the SH4 translator"
1.414 msgstr "Desabilitar o tradutor de SH4"
1.415
1.416 -#: src/maple/controller.c:106 src/maple/lightgun.c:86
1.417 +#: src/maple/controller.c:106
1.418 +#: src/maple/lightgun.c:86
1.419 msgid "Dpad left"
1.420 msgstr "Dpad Esquerda"
1.421
1.422 -#: src/maple/controller.c:107 src/maple/lightgun.c:87
1.423 +#: src/maple/controller.c:107
1.424 +#: src/maple/lightgun.c:87
1.425 msgid "Dpad right"
1.426 msgstr "Dpad Direita"
1.427
1.428 -#: src/maple/controller.c:108 src/maple/lightgun.c:88
1.429 +#: src/maple/controller.c:108
1.430 +#: src/maple/lightgun.c:88
1.431 msgid "Dpad up"
1.432 msgstr "Dpad Cima"
1.433
1.434 -#: src/maple/controller.c:109 src/maple/lightgun.c:89
1.435 +#: src/maple/controller.c:109
1.436 +#: src/maple/lightgun.c:89
1.437 msgid "Dpad down"
1.438 msgstr "Dpad Baixo"
1.439
1.440 @@ -738,11 +740,13 @@
1.441 msgid "Button Y"
1.442 msgstr "Botão Y"
1.443
1.444 -#: src/maple/controller.c:116 src/maple/lightgun.c:90
1.445 +#: src/maple/controller.c:116
1.446 +#: src/maple/lightgun.c:90
1.447 msgid "Button A"
1.448 msgstr "Botão A"
1.449
1.450 -#: src/maple/controller.c:117 src/maple/lightgun.c:91
1.451 +#: src/maple/controller.c:117
1.452 +#: src/maple/lightgun.c:91
1.453 msgid "Button B"
1.454 msgstr "Botão B"
1.455
1.456 @@ -754,14 +758,14 @@
1.457 msgid "Trigger right"
1.458 msgstr "Gatilho Direita"
1.459
1.460 -#: src/maple/controller.c:120 src/maple/lightgun.c:92
1.461 +#: src/maple/controller.c:120
1.462 +#: src/maple/lightgun.c:92
1.463 msgid "Start button"
1.464 msgstr "Botão Start"
1.465
1.466 #: src/maple/vmu.c:92
1.467 -#, fuzzy
1.468 msgid "Volume"
1.469 -msgstr "Valor"
1.470 +msgstr "Volume"
1.471
1.472 #. Can't happen.
1.473 #: src/x86dasm/dis-buf.c:57
1.474 @@ -780,9 +784,8 @@
1.475
1.476 #~ msgid "Bios rom"
1.477 #~ msgstr "Bios rom"
1.478 -
1.479 #~ msgid "Flash rom"
1.480 #~ msgstr "Flash rom"
1.481 -
1.482 #~ msgid "Save state path"
1.483 #~ msgstr "diretório do estado salvo"
1.484 +
2.1 --- a/src/Makefile.am Thu Nov 11 17:51:37 2010 +1000
2.2 +++ b/src/Makefile.am Wed Dec 08 18:33:23 2010 +1000
2.3 @@ -55,7 +55,7 @@
2.4 sh4/cache.c sh4/mmu.h sh4/shadow.c \
2.5 aica/armcore.c aica/armcore.h aica/armdasm.c aica/armdasm.h aica/armmem.c \
2.6 aica/aica.c aica/aica.h aica/audio.c aica/audio.h \
2.7 - pvr2/pvr2.c pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h \
2.8 + pvr2/pvr2.c pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h pvr2/untile.c \
2.9 pvr2/tacore.c pvr2/rendsort.c pvr2/tileiter.h pvr2/shaders.glsl \
2.10 pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c pvr2/scene.h \
2.11 pvr2/gl_sl.c pvr2/shaders.h pvr2/shaders.def pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c \
3.1 --- a/src/Makefile.in Thu Nov 11 17:51:37 2010 +1000
3.2 +++ b/src/Makefile.in Wed Dec 08 18:33:23 2010 +1000
3.3 @@ -155,18 +155,18 @@
3.4 sh4/cache.c sh4/mmu.h sh4/shadow.c aica/armcore.c \
3.5 aica/armcore.h aica/armdasm.c aica/armdasm.h aica/armmem.c \
3.6 aica/aica.c aica/aica.h aica/audio.c aica/audio.h pvr2/pvr2.c \
3.7 - pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h pvr2/tacore.c \
3.8 - pvr2/rendsort.c pvr2/tileiter.h pvr2/shaders.glsl \
3.9 - pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c \
3.10 - pvr2/scene.h pvr2/gl_sl.c pvr2/shaders.h pvr2/shaders.def \
3.11 - pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c maple/maple.c \
3.12 - maple/maple.h maple/controller.c maple/kbd.c maple/mouse.c \
3.13 - maple/lightgun.c maple/vmu.c loader.c loader.h elf.h \
3.14 - bootstrap.c bootstrap.h util.c gdlist.c gdlist.h vmu/vmuvol.c \
3.15 - vmu/vmuvol.h vmu/vmulist.c vmu/vmulist.h display.c display.h \
3.16 - dckeysyms.h drivers/audio_null.c drivers/video_null.c \
3.17 - drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c \
3.18 - drivers/serial_unix.c drivers/cdrom/cdrom.h \
3.19 + pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h pvr2/untile.c \
3.20 + pvr2/tacore.c pvr2/rendsort.c pvr2/tileiter.h \
3.21 + pvr2/shaders.glsl pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c \
3.22 + pvr2/scene.c pvr2/scene.h pvr2/gl_sl.c pvr2/shaders.h \
3.23 + pvr2/shaders.def pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c \
3.24 + maple/maple.c maple/maple.h maple/controller.c maple/kbd.c \
3.25 + maple/mouse.c maple/lightgun.c maple/vmu.c loader.c loader.h \
3.26 + elf.h bootstrap.c bootstrap.h util.c gdlist.c gdlist.h \
3.27 + vmu/vmuvol.c vmu/vmuvol.h vmu/vmulist.c vmu/vmulist.h \
3.28 + display.c display.h dckeysyms.h drivers/audio_null.c \
3.29 + drivers/video_null.c drivers/video_gl.c drivers/video_gl.h \
3.30 + drivers/gl_fbo.c drivers/serial_unix.c drivers/cdrom/cdrom.h \
3.31 drivers/cdrom/cdrom.c drivers/cdrom/drive.h \
3.32 drivers/cdrom/sector.h drivers/cdrom/sector.c \
3.33 drivers/cdrom/defs.h drivers/cdrom/cd_nrg.c \
3.34 @@ -262,31 +262,31 @@
3.35 lxdream-armdasm.$(OBJEXT) lxdream-armmem.$(OBJEXT) \
3.36 lxdream-aica.$(OBJEXT) lxdream-audio.$(OBJEXT) \
3.37 lxdream-pvr2.$(OBJEXT) lxdream-pvr2mem.$(OBJEXT) \
3.38 - lxdream-tacore.$(OBJEXT) lxdream-rendsort.$(OBJEXT) \
3.39 - lxdream-texcache.$(OBJEXT) lxdream-yuv.$(OBJEXT) \
3.40 - lxdream-rendsave.$(OBJEXT) lxdream-scene.$(OBJEXT) \
3.41 - lxdream-gl_sl.$(OBJEXT) lxdream-glutil.$(OBJEXT) \
3.42 - lxdream-glrender.$(OBJEXT) lxdream-maple.$(OBJEXT) \
3.43 - lxdream-controller.$(OBJEXT) lxdream-kbd.$(OBJEXT) \
3.44 - lxdream-mouse.$(OBJEXT) lxdream-lightgun.$(OBJEXT) \
3.45 - lxdream-vmu.$(OBJEXT) lxdream-loader.$(OBJEXT) \
3.46 - lxdream-bootstrap.$(OBJEXT) lxdream-util.$(OBJEXT) \
3.47 - lxdream-gdlist.$(OBJEXT) lxdream-vmuvol.$(OBJEXT) \
3.48 - lxdream-vmulist.$(OBJEXT) lxdream-display.$(OBJEXT) \
3.49 - lxdream-audio_null.$(OBJEXT) lxdream-video_null.$(OBJEXT) \
3.50 - lxdream-video_gl.$(OBJEXT) lxdream-gl_fbo.$(OBJEXT) \
3.51 - lxdream-serial_unix.$(OBJEXT) lxdream-cdrom.$(OBJEXT) \
3.52 - lxdream-sector.$(OBJEXT) lxdream-cd_nrg.$(OBJEXT) \
3.53 - lxdream-cd_cdi.$(OBJEXT) lxdream-cd_gdi.$(OBJEXT) \
3.54 - lxdream-edc_ecc.$(OBJEXT) lxdream-drive.$(OBJEXT) \
3.55 - lxdream-cd_mmc.$(OBJEXT) lxdream-isofs.$(OBJEXT) \
3.56 - lxdream-hotkeys.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
3.57 - $(am__objects_3) $(am__objects_4) $(am__objects_5) \
3.58 - $(am__objects_6) $(am__objects_7) $(am__objects_8) \
3.59 - $(am__objects_9) $(am__objects_10) $(am__objects_11) \
3.60 - $(am__objects_12) $(am__objects_13) $(am__objects_14) \
3.61 - $(am__objects_15) $(am__objects_16) $(am__objects_17) \
3.62 - $(am__objects_18)
3.63 + lxdream-untile.$(OBJEXT) lxdream-tacore.$(OBJEXT) \
3.64 + lxdream-rendsort.$(OBJEXT) lxdream-texcache.$(OBJEXT) \
3.65 + lxdream-yuv.$(OBJEXT) lxdream-rendsave.$(OBJEXT) \
3.66 + lxdream-scene.$(OBJEXT) lxdream-gl_sl.$(OBJEXT) \
3.67 + lxdream-glutil.$(OBJEXT) lxdream-glrender.$(OBJEXT) \
3.68 + lxdream-maple.$(OBJEXT) lxdream-controller.$(OBJEXT) \
3.69 + lxdream-kbd.$(OBJEXT) lxdream-mouse.$(OBJEXT) \
3.70 + lxdream-lightgun.$(OBJEXT) lxdream-vmu.$(OBJEXT) \
3.71 + lxdream-loader.$(OBJEXT) lxdream-bootstrap.$(OBJEXT) \
3.72 + lxdream-util.$(OBJEXT) lxdream-gdlist.$(OBJEXT) \
3.73 + lxdream-vmuvol.$(OBJEXT) lxdream-vmulist.$(OBJEXT) \
3.74 + lxdream-display.$(OBJEXT) lxdream-audio_null.$(OBJEXT) \
3.75 + lxdream-video_null.$(OBJEXT) lxdream-video_gl.$(OBJEXT) \
3.76 + lxdream-gl_fbo.$(OBJEXT) lxdream-serial_unix.$(OBJEXT) \
3.77 + lxdream-cdrom.$(OBJEXT) lxdream-sector.$(OBJEXT) \
3.78 + lxdream-cd_nrg.$(OBJEXT) lxdream-cd_cdi.$(OBJEXT) \
3.79 + lxdream-cd_gdi.$(OBJEXT) lxdream-edc_ecc.$(OBJEXT) \
3.80 + lxdream-drive.$(OBJEXT) lxdream-cd_mmc.$(OBJEXT) \
3.81 + lxdream-isofs.$(OBJEXT) lxdream-hotkeys.$(OBJEXT) \
3.82 + $(am__objects_1) $(am__objects_2) $(am__objects_3) \
3.83 + $(am__objects_4) $(am__objects_5) $(am__objects_6) \
3.84 + $(am__objects_7) $(am__objects_8) $(am__objects_9) \
3.85 + $(am__objects_10) $(am__objects_11) $(am__objects_12) \
3.86 + $(am__objects_13) $(am__objects_14) $(am__objects_15) \
3.87 + $(am__objects_16) $(am__objects_17) $(am__objects_18)
3.88 lxdream_OBJECTS = $(am_lxdream_OBJECTS)
3.89 lxdream_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
3.90 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
3.91 @@ -575,34 +575,35 @@
3.92 sh4/shadow.c aica/armcore.c aica/armcore.h aica/armdasm.c \
3.93 aica/armdasm.h aica/armmem.c aica/aica.c aica/aica.h \
3.94 aica/audio.c aica/audio.h pvr2/pvr2.c pvr2/pvr2.h \
3.95 - pvr2/pvr2mem.c pvr2/pvr2mmio.h pvr2/tacore.c pvr2/rendsort.c \
3.96 - pvr2/tileiter.h pvr2/shaders.glsl pvr2/texcache.c pvr2/yuv.c \
3.97 - pvr2/rendsave.c pvr2/scene.c pvr2/scene.h pvr2/gl_sl.c \
3.98 - pvr2/shaders.h pvr2/shaders.def pvr2/glutil.c pvr2/glutil.h \
3.99 - pvr2/glrender.c maple/maple.c maple/maple.h maple/controller.c \
3.100 - maple/kbd.c maple/mouse.c maple/lightgun.c maple/vmu.c \
3.101 - loader.c loader.h elf.h bootstrap.c bootstrap.h util.c \
3.102 - gdlist.c gdlist.h vmu/vmuvol.c vmu/vmuvol.h vmu/vmulist.c \
3.103 - vmu/vmulist.h display.c display.h dckeysyms.h \
3.104 - drivers/audio_null.c drivers/video_null.c drivers/video_gl.c \
3.105 - drivers/video_gl.h drivers/gl_fbo.c drivers/serial_unix.c \
3.106 - drivers/cdrom/cdrom.h drivers/cdrom/cdrom.c \
3.107 - drivers/cdrom/drive.h drivers/cdrom/sector.h \
3.108 - drivers/cdrom/sector.c drivers/cdrom/defs.h \
3.109 - drivers/cdrom/cd_nrg.c drivers/cdrom/cd_cdi.c \
3.110 - drivers/cdrom/cd_gdi.c drivers/cdrom/edc_ecc.c \
3.111 - drivers/cdrom/ecc.h drivers/cdrom/drive.c \
3.112 - drivers/cdrom/edc_crctable.h drivers/cdrom/edc_encoder.h \
3.113 - drivers/cdrom/edc_l2sq.h drivers/cdrom/edc_scramble.h \
3.114 - drivers/cdrom/cd_mmc.c drivers/cdrom/isofs.h \
3.115 - drivers/cdrom/isofs.c sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in \
3.116 - sh4/sh4dasm.in sh4/sh4stat.in hotkeys.c hotkeys.h \
3.117 - $(am__append_1) $(am__append_2) $(am__append_4) \
3.118 - $(am__append_5) $(am__append_6) $(am__append_7) \
3.119 - $(am__append_8) $(am__append_9) $(am__append_10) \
3.120 - $(am__append_17) $(am__append_19) $(am__append_21) \
3.121 - $(am__append_23) $(am__append_25) $(am__append_27) \
3.122 - $(am__append_28) $(am__append_29) $(am__append_30)
3.123 + pvr2/pvr2mem.c pvr2/pvr2mmio.h pvr2/untile.c pvr2/tacore.c \
3.124 + pvr2/rendsort.c pvr2/tileiter.h pvr2/shaders.glsl \
3.125 + pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c \
3.126 + pvr2/scene.h pvr2/gl_sl.c pvr2/shaders.h pvr2/shaders.def \
3.127 + pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c maple/maple.c \
3.128 + maple/maple.h maple/controller.c maple/kbd.c maple/mouse.c \
3.129 + maple/lightgun.c maple/vmu.c loader.c loader.h elf.h \
3.130 + bootstrap.c bootstrap.h util.c gdlist.c gdlist.h vmu/vmuvol.c \
3.131 + vmu/vmuvol.h vmu/vmulist.c vmu/vmulist.h display.c display.h \
3.132 + dckeysyms.h drivers/audio_null.c drivers/video_null.c \
3.133 + drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c \
3.134 + drivers/serial_unix.c drivers/cdrom/cdrom.h \
3.135 + drivers/cdrom/cdrom.c drivers/cdrom/drive.h \
3.136 + drivers/cdrom/sector.h drivers/cdrom/sector.c \
3.137 + drivers/cdrom/defs.h drivers/cdrom/cd_nrg.c \
3.138 + drivers/cdrom/cd_cdi.c drivers/cdrom/cd_gdi.c \
3.139 + drivers/cdrom/edc_ecc.c drivers/cdrom/ecc.h \
3.140 + drivers/cdrom/drive.c drivers/cdrom/edc_crctable.h \
3.141 + drivers/cdrom/edc_encoder.h drivers/cdrom/edc_l2sq.h \
3.142 + drivers/cdrom/edc_scramble.h drivers/cdrom/cd_mmc.c \
3.143 + drivers/cdrom/isofs.h drivers/cdrom/isofs.c sh4/sh4.def \
3.144 + sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \
3.145 + hotkeys.c hotkeys.h $(am__append_1) $(am__append_2) \
3.146 + $(am__append_4) $(am__append_5) $(am__append_6) \
3.147 + $(am__append_7) $(am__append_8) $(am__append_9) \
3.148 + $(am__append_10) $(am__append_17) $(am__append_19) \
3.149 + $(am__append_21) $(am__append_23) $(am__append_25) \
3.150 + $(am__append_27) $(am__append_28) $(am__append_29) \
3.151 + $(am__append_30)
3.152 lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
3.153 @BUILD_SH4X86_TRUE@test_testsh4x86_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@
3.154 @BUILD_SH4X86_TRUE@test_testsh4x86_CPPFLAGS = @LXDREAMCPPFLAGS@
3.155 @@ -875,6 +876,7 @@
3.156 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-tacore.Po@am__quote@
3.157 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-texcache.Po@am__quote@
3.158 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-timer.Po@am__quote@
3.159 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-untile.Po@am__quote@
3.160 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-util.Po@am__quote@
3.161 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-version.Po@am__quote@
3.162 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxdream-video_gdk.Po@am__quote@
3.163 @@ -1565,6 +1567,20 @@
3.164 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3.165 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-pvr2mem.obj `if test -f 'pvr2/pvr2mem.c'; then $(CYGPATH_W) 'pvr2/pvr2mem.c'; else $(CYGPATH_W) '$(srcdir)/pvr2/pvr2mem.c'; fi`
3.166
3.167 +lxdream-untile.o: pvr2/untile.c
3.168 +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-untile.o -MD -MP -MF "$(DEPDIR)/lxdream-untile.Tpo" -c -o lxdream-untile.o `test -f 'pvr2/untile.c' || echo '$(srcdir)/'`pvr2/untile.c; \
3.169 +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lxdream-untile.Tpo" "$(DEPDIR)/lxdream-untile.Po"; else rm -f "$(DEPDIR)/lxdream-untile.Tpo"; exit 1; fi
3.170 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pvr2/untile.c' object='lxdream-untile.o' libtool=no @AMDEPBACKSLASH@
3.171 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3.172 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-untile.o `test -f 'pvr2/untile.c' || echo '$(srcdir)/'`pvr2/untile.c
3.173 +
3.174 +lxdream-untile.obj: pvr2/untile.c
3.175 +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-untile.obj -MD -MP -MF "$(DEPDIR)/lxdream-untile.Tpo" -c -o lxdream-untile.obj `if test -f 'pvr2/untile.c'; then $(CYGPATH_W) 'pvr2/untile.c'; else $(CYGPATH_W) '$(srcdir)/pvr2/untile.c'; fi`; \
3.176 +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lxdream-untile.Tpo" "$(DEPDIR)/lxdream-untile.Po"; else rm -f "$(DEPDIR)/lxdream-untile.Tpo"; exit 1; fi
3.177 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pvr2/untile.c' object='lxdream-untile.obj' libtool=no @AMDEPBACKSLASH@
3.178 +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3.179 +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lxdream-untile.obj `if test -f 'pvr2/untile.c'; then $(CYGPATH_W) 'pvr2/untile.c'; else $(CYGPATH_W) '$(srcdir)/pvr2/untile.c'; fi`
3.180 +
3.181 lxdream-tacore.o: pvr2/tacore.c
3.182 @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lxdream_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lxdream-tacore.o -MD -MP -MF "$(DEPDIR)/lxdream-tacore.Tpo" -c -o lxdream-tacore.o `test -f 'pvr2/tacore.c' || echo '$(srcdir)/'`pvr2/tacore.c; \
3.183 @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lxdream-tacore.Tpo" "$(DEPDIR)/lxdream-tacore.Po"; else rm -f "$(DEPDIR)/lxdream-tacore.Tpo"; exit 1; fi
4.1 --- a/src/pvr2/glrender.c Thu Nov 11 17:51:37 2010 +1000
4.2 +++ b/src/pvr2/glrender.c Wed Dec 08 18:33:23 2010 +1000
4.3 @@ -222,7 +222,7 @@
4.4 } while( poly != NULL );
4.5 }
4.6
4.7 -static void gl_render_poly( struct polygon_struct *poly, gboolean set_depth)
4.8 +void gl_render_poly( struct polygon_struct *poly, gboolean set_depth)
4.9 {
4.10 if( poly->vertex_count == 0 )
4.11 return; /* Culled */
4.12 @@ -390,6 +390,35 @@
4.13 glDisable( GL_STENCIL_TEST );
4.14 }
4.15
4.16 +static void gl_render_stencil( )
4.17 +{
4.18 + struct tile_segment *segment = pvr2_scene.segment_list;
4.19 + if( display_driver->capabilities.stencil_bits >= 2 ) {
4.20 + glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );
4.21 + do {
4.22 + int tilex = SEGMENT_X(segment->control);
4.23 + int tiley = SEGMENT_Y(segment->control);
4.24 +
4.25 + uint32_t tile_bounds[4] = { tilex << 5, (tilex+1)<<5, tiley<<5, (tiley+1)<<5 };
4.26 + if( !clip_tile_bounds(tile_bounds, pvr2_scene.bounds) ) {
4.27 + continue; // fully clipped, skip tile
4.28 + }
4.29 +
4.30 + /* Clip to the visible part of the tile */
4.31 + glScissor( tile_bounds[0], pvr2_scene.buffer_height-tile_bounds[3],
4.32 + tile_bounds[1]-tile_bounds[0], tile_bounds[3] - tile_bounds[2] );
4.33 + if( IS_TILE_PTR(segment->opaquemod_ptr) &&
4.34 + !IS_EMPTY_TILE_LIST(segment->opaquemod_ptr) ) {
4.35 + gl_render_tilelist_depthonly(segment->opaque_ptr);
4.36 + gl_render_modifier_tilelist(segment->opaquemod_ptr, tile_bounds);
4.37 + }
4.38 + } while( !IS_LAST_SEGMENT(segment++) );
4.39 + glClear( GL_DEPTH_BUFFER_BIT );
4.40 + glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
4.41 + }
4.42 +}
4.43 +
4.44 +
4.45 /**
4.46 * Render the currently defined scene in pvr2_scene
4.47 */
4.48 @@ -444,6 +473,12 @@
4.49 glEnable( GL_FOG );
4.50 glEnable( GL_TEXTURE_2D );
4.51
4.52 + gl_render_stencil();
4.53 +
4.54 + glDisable( GL_SCISSOR_TEST );
4.55 + untile_list(pvr2_scene.segment_list, 0, 0);
4.56 + glEnable( GL_SCISSOR_TEST );
4.57 +
4.58 /* Process the segment list */
4.59 struct tile_segment *segment = pvr2_scene.segment_list;
4.60 do {
4.61 @@ -458,19 +493,6 @@
4.62 /* Clip to the visible part of the tile */
4.63 glScissor( tile_bounds[0], pvr2_scene.buffer_height-tile_bounds[3],
4.64 tile_bounds[1]-tile_bounds[0], tile_bounds[3] - tile_bounds[2] );
4.65 - if( display_driver->capabilities.stencil_bits >= 2 &&
4.66 - IS_TILE_PTR(segment->opaquemod_ptr) &&
4.67 - !IS_EMPTY_TILE_LIST(segment->opaquemod_ptr) ) {
4.68 - /* Don't do this unless there's actually some shadow polygons */
4.69 -
4.70 - /* Use colormask instead of drawbuffer for simplicity */
4.71 - glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );
4.72 - gl_render_tilelist_depthonly(segment->opaque_ptr);
4.73 - gl_render_modifier_tilelist(segment->opaquemod_ptr, tile_bounds);
4.74 - glClear( GL_DEPTH_BUFFER_BIT );
4.75 - glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
4.76 - }
4.77 - gl_render_tilelist(segment->opaque_ptr,TRUE);
4.78 if( IS_TILE_PTR(segment->punchout_ptr) ) {
4.79 glEnable(GL_ALPHA_TEST );
4.80 glDepthFunc(GL_GEQUAL);
5.1 --- a/src/pvr2/scene.h Thu Nov 11 17:51:37 2010 +1000
5.2 +++ b/src/pvr2/scene.h Wed Dec 08 18:33:23 2010 +1000
5.3 @@ -82,6 +82,7 @@
5.4 #define MAX_POLYGONS (87382*2)
5.5 #define MAX_POLY_BUFFER_SIZE (MAX_POLYGONS*sizeof(struct polygon_struct))
5.6 #define BUF_POLY_MAP_SIZE (4 MB)
5.7 +#define POLY_NO(poly) (poly - pvr2_scene.poly_array)
5.8
5.9 /*************************************************************************/
5.10
6.1 --- a/src/pvr2/tileiter.h Thu Nov 11 17:51:37 2010 +1000
6.2 +++ b/src/pvr2/tileiter.h Wed Dec 08 18:33:23 2010 +1000
6.3 @@ -84,34 +84,36 @@
6.4 for(;;){
6.5 uint32_t entry = *it->ptr;
6.6 uint32_t tag = entry >> 29;
6.7 - if( tag == 0x07 ) {
6.8 - if( tag & 0x10000000 ) {
6.9 - it->ptr = NULL;
6.10 + if( tag < 6 ) {
6.11 + if( tag & 0x04 ) {
6.12 + int vertex_count = tag-1; /* 4 == tri, 5 == quad */
6.13 + int vertex_length = (entry >> 21) & 0x07;
6.14 + if( (entry & 0x01000000) && (pvr2_scene.shadow_mode == SHADOW_FULL) ) {
6.15 + it->poly_size = 5 + (vertex_length<<1) * vertex_count;
6.16 + } else {
6.17 + it->poly_size = 3 + vertex_length * vertex_count;
6.18 + }
6.19 + it->strip_count = ((entry >> 25) & 0x0F);
6.20 + it->poly_addr = entry & 0x001FFFFF;
6.21 return;
6.22 } else {
6.23 - it->ptr = (uint32_t *)(pvr2_main_ram + (entry&0x007FFFFF));
6.24 - it->poly_addr = -1;
6.25 - entry = *it->ptr;
6.26 + /* Other polygon */
6.27 + it->strip_count = 0;
6.28 + it->poly_addr = entry & 0x001FFFFF;
6.29 + return;
6.30 }
6.31 - } else if( tag == 6 ) {
6.32 - /* Illegal? Skip */
6.33 - it->ptr++;
6.34 - } else if( tag & 0x04 ) {
6.35 - int vertex_count = tag-1; /* 4 == tri, 5 == quad */
6.36 - int vertex_length = (entry >> 21) & 0x07;
6.37 - if( (entry & 0x01000000) && (pvr2_scene.shadow_mode == SHADOW_FULL) ) {
6.38 - it->poly_size = 5 + (vertex_length<<1) * vertex_count;
6.39 - } else {
6.40 - it->poly_size = 3 + vertex_length * vertex_count;
6.41 + } else {
6.42 + if( tag == 0x07 ) {
6.43 + if( entry & 0x10000000 ) {
6.44 + it->ptr = NULL;
6.45 + return;
6.46 + } else {
6.47 + it->ptr = (uint32_t *)(pvr2_main_ram + (entry&0x007FFFFF));
6.48 + }
6.49 + } else if( tag == 6 ) {
6.50 + /* Illegal? Skip */
6.51 + it->ptr++;
6.52 }
6.53 - it->strip_count = ((entry >> 25) & 0x0F);
6.54 - it->poly_addr = entry & 0x001FFFFF;
6.55 - return;
6.56 - } else {
6.57 - /* Other polygon */
6.58 - it->strip_count = 0;
6.59 - it->poly_addr = entry & 0x001FFFFF;
6.60 - return;
6.61 }
6.62 }
6.63 }
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/src/pvr2/untile.c Wed Dec 08 18:33:23 2010 +1000
7.3 @@ -0,0 +1,143 @@
7.4 +/**
7.5 + * $Id$
7.6 + *
7.7 + * Process the tile + polygon data to extract a list of polygons that can
7.8 + * be rendered directly without tiling.
7.9 + *
7.10 + * Copyright (c) 2010 Nathan Keynes.
7.11 + *
7.12 + * This program is free software; you can redistribute it and/or modify
7.13 + * it under the terms of the GNU General Public License as published by
7.14 + * the Free Software Foundation; either version 2 of the License, or
7.15 + * (at your option) any later version.
7.16 + *
7.17 + * This program is distributed in the hope that it will be useful,
7.18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7.19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7.20 + * GNU General Public License for more details.
7.21 + */
7.22 +
7.23 +#include <stdlib.h>
7.24 +#include "pvr2/pvr2.h"
7.25 +#include "pvr2/scene.h"
7.26 +#include "pvr2/tileiter.h"
7.27 +
7.28 +static int sort_polydata( const void *a, const void *b )
7.29 +{
7.30 + uint32_t idxa = *(const uint32_t*)a;
7.31 + uint32_t idxb = *(const uint32_t*)b;
7.32 + return pvr2_scene.poly_array[idxa].context - pvr2_scene.poly_array[idxb].context;
7.33 +}
7.34 +
7.35 +gboolean untile_list( struct tile_segment *segment, int pass, int list )
7.36 +{
7.37 + int tile_width = pvr2_scene.buffer_width >> 5;
7.38 + int tile_height = pvr2_scene.buffer_height >> 5;
7.39 + tileiter tile_map[tile_width][tile_height];
7.40 +
7.41 + memset(tile_map, 0, tile_width*tile_height*sizeof(uint32_t *));
7.42 +
7.43 + /* 1. Construct the tile map for the last/pass */
7.44 + int last_x = -1, last_y = -1, tile_pass;
7.45 + do {
7.46 + int tile_x = SEGMENT_X(segment->control);
7.47 + int tile_y = SEGMENT_Y(segment->control);
7.48 + if( last_x == tile_x && last_y == tile_y ) {
7.49 + tile_pass++;
7.50 + } else {
7.51 + tile_pass = 0;
7.52 + last_x = tile_x;
7.53 + last_y = tile_y;
7.54 + }
7.55 +
7.56 + if( tile_pass == pass ) {
7.57 + uint32_t ptr = ((uint32_t *)segment)[list+1];
7.58 + if( IS_TILE_PTR(ptr) )
7.59 + TILEITER_BEGIN(tile_map[tile_x][tile_y], ptr);
7.60 + }
7.61 + } while( !IS_LAST_SEGMENT(segment++) );
7.62 +
7.63 + /* 2. Extract the polygon list, sorted by appearance. We assume the list
7.64 + * can be sorted by address, which makes this a lot simpler/faster.
7.65 + */
7.66 + uint32_t poly_present[pvr2_scene.poly_count];
7.67 + memset( poly_present, 0, sizeof(poly_present) );
7.68 + unsigned x,y, i, j, poly_count = 0;
7.69 + for( x = 0; x < tile_width; x++ ) {
7.70 + for( y = 0; y < tile_height; y++ ) {
7.71 + tileiter list = tile_map[x][y];
7.72 + while( !TILEITER_DONE(list) ) {
7.73 + struct polygon_struct *poly = pvr2_scene.buf_to_poly_map[TILEITER_POLYADDR(list)];
7.74 + if( poly ) {
7.75 + poly_present[POLY_NO(poly)] = 1;
7.76 + }
7.77 + TILEITER_NEXT(list);
7.78 + }
7.79 + }
7.80 + }
7.81 + /* Collapse array into a set of polygon indexes and then sort it */
7.82 + for( x=0; x<pvr2_scene.poly_count; x++ ) {
7.83 + if( poly_present[x] ) {
7.84 + poly_present[poly_count++] = x;
7.85 + }
7.86 + }
7.87 + qsort(poly_present, poly_count, sizeof(uint32_t), sort_polydata);
7.88 +
7.89 + /* 3. Process each polygon in the list. Extract the bounds, and check
7.90 + * each tile in which it should appear - if missing, the poly is clipped
7.91 + * (and we need to construct appropriate bounds).
7.92 + */
7.93 + for( i=0; i<poly_count; i++ ) {
7.94 + struct tile_bounds poly_bounds = {tile_width, tile_height, -1, -1};
7.95 + struct tile_bounds clip_bounds = {0, 0, tile_width, tile_height};
7.96 + struct polygon_struct *poly = &pvr2_scene.poly_array[poly_present[i]];
7.97 + uint32_t poly_addr = poly->context - ((uint32_t *)pvr2_main_ram);
7.98 + do {
7.99 + /* Extract tile bounds for the poly - we assume (since we have the
7.100 + * polygon at all) that it appears correctly in at least one tile.
7.101 + */
7.102 + struct vertex_struct *vert = &pvr2_scene.vertex_array[poly->vertex_index];
7.103 + for( j=0; j<poly->vertex_count; j++ ) {
7.104 + int tx, ty;
7.105 + if( vert[j].x < 0 ) tx = 0;
7.106 + else if( vert[j].x >= pvr2_scene.buffer_width ) tx = tile_width-1;
7.107 + else tx = ((int)vert[j].x)>>5;
7.108 + if( tx < poly_bounds.x1 ) poly_bounds.x1 = tx;
7.109 + if( tx > poly_bounds.x2 ) poly_bounds.x2 = tx;
7.110 + if( vert[j].y < 0 ) ty = 0;
7.111 + else if( vert[j].y >= pvr2_scene.buffer_height ) ty = tile_height-1;
7.112 + else ty = ((int)vert[j].y)>>5;
7.113 + if( ty < poly_bounds.y1 ) poly_bounds.y1 = ty;
7.114 + if( ty > poly_bounds.y2 ) poly_bounds.y2 = ty;
7.115 + }
7.116 + poly = poly->sub_next;
7.117 + } while( poly != NULL );
7.118 + if( poly_bounds.x1 == tile_width ) {
7.119 + continue; /* Polygon has been culled */
7.120 + }
7.121 +
7.122 + gl_render_poly(&pvr2_scene.poly_array[poly_present[i]], TRUE);
7.123 +#if 0
7.124 + /* Search the tile map for the polygon */
7.125 + for( x = poly_bounds.x1; x <= poly_bounds.x2; x++ ) {
7.126 + for( y = poly_bounds.y1; y <= poly_bounds.y2; y++ ) {
7.127 + tileiter *list = &tile_map[x][y];
7.128 +
7.129 +
7.130 + /* Skip over earlier entries in the list, if any (can happen if
7.131 + * we culled something, or had an empty polygon
7.132 + */
7.133 + while( !TILEITER_DONE(*list) && TILEITER_POLYADDR(*list) < poly_addr )
7.134 + TILEITER_NEXT(*list);
7.135 + if( TILEITER_POLYADDR(*list) == poly_addr ) {
7.136 + /* Match */
7.137 + } else {
7.138 + /* Clipped */
7.139 + }
7.140 + }
7.141 + }
7.142 +#endif
7.143 + }
7.144 +}
7.145 +
7.146 +
8.1 --- a/src/tools/genglsl.c Thu Nov 11 17:51:37 2010 +1000
8.2 +++ b/src/tools/genglsl.c Wed Dec 08 18:33:23 2010 +1000
8.3 @@ -37,10 +37,16 @@
8.4 FRAGMENT_SHADER = 1
8.5 } shader_type_t;
8.6
8.7 +typedef struct uniform {
8.8 + const char *name;
8.9 + const char *var_name;
8.10 +} *uniform_t;
8.11 +
8.12 typedef struct shader {
8.13 shader_type_t type;
8.14 const char *name;
8.15 char *body;
8.16 + GList *uniforms;
8.17 } *shader_t;
8.18
8.19 typedef struct program {
8.20 @@ -86,6 +92,7 @@
8.21 shader->name = strdup(g_strstrip(buf+8));
8.22 shader->body = malloc(DEF_ALLOC_SIZE);
8.23 shader->body[0] = '\0';
8.24 + shader->uniforms = 0;
8.25 current_size = DEF_ALLOC_SIZE;
8.26 current_posn = 0;
8.27 result->shaders = g_list_append(result->shaders, shader);
8.28 @@ -96,12 +103,14 @@
8.29 shader->name = strdup(g_strstrip(buf+10));
8.30 shader->body = malloc(DEF_ALLOC_SIZE);
8.31 shader->body[0] = '\0';
8.32 + shader->uniforms = 0;
8.33 current_size = DEF_ALLOC_SIZE;
8.34 current_posn = 0;
8.35 result->shaders = g_list_append(result->shaders, shader);
8.36 } else if( strncmp( buf, "#program ", 9 ) == 0 ) {
8.37 shader = NULL;
8.38 program_t program = malloc(sizeof(struct program));
8.39 + assert( program != NULL );
8.40 char *rest = buf+9;
8.41 char *equals = strchr(rest, '=');
8.42 if( equals == NULL ) {
8.43 @@ -115,6 +124,23 @@
8.44 for(i=0;program->shader_names[i] != NULL; i++ );
8.45 if( i > result->max_shaders )
8.46 result->max_shaders = i;
8.47 + } else if( strncmp( buf, "#uniform ", 9 ) == 0 ) {
8.48 + uniform_t uniform = malloc(sizeof(struct uniform));
8.49 + assert( uniform != NULL );
8.50 + if( shader == NULL ) {
8.51 + fprintf( stderr, "Error: #uniform specified outside of shader: %s\n", buf );
8.52 + exit(2);
8.53 + }
8.54 + char *rest = buf+9;
8.55 + char *equals = strchr(rest, '=');
8.56 + if( equals == NULL ) {
8.57 + fprintf( stderr, "Error: invalid program line %s\n", buf );
8.58 + exit(2);
8.59 + }
8.60 + *equals = '\0';
8.61 + uniform->name = g_strdup(g_strstrip(rest));
8.62 + uniform->var_name = g_strdup(g_strstrip(equals+1));
8.63 + shader->uniforms = g_list_append(shader->uniforms, uniform);
8.64 } else if( shader != NULL ) {
8.65 size_t len = strlen(buf);
8.66 if( current_posn + len > current_size ) {
8.67 @@ -149,6 +175,17 @@
8.68 }
8.69 }
8.70
8.71 +static uniform_t find_uniform_name( GList *list, const char *name )
8.72 +{
8.73 + GList *ptr;
8.74 + for( ptr = list; ptr != NULL; ptr = ptr->next ) {
8.75 + uniform_t data = (uniform_t)list->data;
8.76 + if( strcmp( data->name, name ) == 0 )
8.77 + return data;
8.78 + }
8.79 + return NULL;
8.80 +}
8.81 +
8.82 static void writeHeader( FILE *out, glsldata_t data )
8.83 {
8.84 fprintf( out, "/*\n * This file automatically generated by genglsl from %s\n */\n", data->filename );
8.85 @@ -168,12 +205,22 @@
8.86 fprintf( f, "typedef enum {\n" );
8.87 const char *last_name = NULL;
8.88 int count = 0;
8.89 + GList *unique_uniforms;
8.90 + int uniform_count = 0;
8.91 GList *shader_ptr;
8.92 for( shader_ptr = data->shaders; shader_ptr != NULL; shader_ptr = shader_ptr->next ) {
8.93 count++;
8.94 shader_t shader = (shader_t)shader_ptr->data;
8.95 fprintf( f, " %s,\n", shader->name );
8.96 last_name = shader->name;
8.97 + GList *uniform_ptr;
8.98 + for( uniform_ptr = shader->uniforms; uniform_ptr != NULL; uniform_ptr = uniform_ptr->next ) {
8.99 + uniform_t uniform = (uniform_t)uniform_ptr->data;
8.100 + if( find_uniform_name(unique_uniforms, uniform->name) == NULL ) {
8.101 + unique_uniforms = g_list_append( unique_uniforms, uniform );
8.102 + uniform_count++;
8.103 + }
8.104 + }
8.105 }
8.106 fprintf( f, "} shader_id;\n\n" );
8.107
8.108 @@ -184,6 +231,7 @@
8.109 fprintf( f, "#define GLSL_NO_SHADER -1\n\n" );
8.110 fprintf( f, "#define GLSL_VERTEX_SHADER 1\n" );
8.111 fprintf( f, "#define GLSL_FRAGMENT_SHADER 2\n" );
8.112 + fprintf( f, "#define GLSL_NUM_UNIFORMS %d\n", uniform_count );
8.113
8.114 fprintf( f, "typedef enum {\n" );
8.115 last_name = NULL;
9.1 --- a/test/pvr.c Thu Nov 11 17:51:37 2010 +1000
9.2 +++ b/test/pvr.c Wed Dec 08 18:33:23 2010 +1000
9.3 @@ -42,6 +42,7 @@
9.4 #define RENDER_ADDR2 (PVR_BASE+0x064)
9.5 #define RENDER_HCLIP (PVR_BASE+0x068)
9.6 #define RENDER_VCLIP (PVR_BASE+0x06C)
9.7 +#define RENDER_SHADOW (PVR_BASE+0x074)
9.8 #define RENDER_NEARCLIP (PVR_BASE+0x078)
9.9 #define RENDER_FARCLIP (PVR_BASE+0x088)
9.10 #define RENDER_BGPLANE (PVR_BASE+0x08C)
9.11 @@ -252,6 +253,7 @@
9.12 long_write( RENDER_POLYBASE, config->polybuf );
9.13 long_write( RENDER_TILEBASE, config->tilemap );
9.14 long_write( RENDER_ADDR1, config->render_addr );
9.15 + long_write( RENDER_SHADOW, 0x140 );
9.16 long_write( RENDER_SIZE, modulo >> 3 );
9.17 long_write( RENDER_ADDR2, config->render_addr + modulo ); /* Not used? */
9.18 long_write( RENDER_HCLIP, (config->width - 1) << 16 );
.