Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

graphic Linear mode init #115

Open
ericde45 opened this issue Feb 24, 2018 · 8 comments
Open

graphic Linear mode init #115

ericde45 opened this issue Feb 24, 2018 · 8 comments

Comments

@ericde45
Copy link

hello

would it be possible to initialize the graphic subsystem in linear double buffer mode, instead of the tiled currently used for example in test_display ?

it's very difficult to find where this can be changed, as my only documentation is switchbrew + TX1 pdf doc.

thanks

@roblabla
Copy link
Member

I suppose it'd be somewhere in there : https://github.com/reswitched/libtransistor/blob/1cc62f7963db576021e5edab49f7d5fb7550b371/lib/display/display.c

I'm not very familiar with the graphics subsystem though. Misson could probably tell you more.

@misson20000
Copy link
Member

Not that I know of. It's probably one of the fields in graphic_buffer_t. Why do you want to change it?

@ericde45
Copy link
Author

using tiled graphic memory is a mess
it is a lot easier to have linear memory, to draw things a lot faster
using CPU of course. ( as i don't think that a documentation for GPU use in Switch is already available ? )

@misson20000
Copy link
Member

Shouldn't be too bad if you use our swizzling function

@ericde45
Copy link
Author

swizzle is taking CPU time
the doom port was optimized using tables to replace swizzle
the best way is to be in linear mode
i checked libnx and it is directly in linear mode but i was not able to figure which init value is different

@roblabla
Copy link
Member

I calculated the swizzle and the time it takes is negligeable. According to discord history, it takes 86us.

@iOS4all

This comment has been minimized.

@ericde45
Copy link
Author

i'am from the old school, coding demos at the end of the eighties on Atari ST and Amiga
so not optimizing is not my nature :)
if you find the information to switch to linear , i am really interested. but i don't think it is a priority.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants