libtransistor icon indicating copy to clipboard operation
libtransistor copied to clipboard

graphic Linear mode init

Open ericde45 opened this issue 7 years ago • 8 comments

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

ericde45 avatar Feb 24 '18 12:02 ericde45

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.

roblabla avatar Feb 24 '18 13:02 roblabla

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

misson20000 avatar Feb 24 '18 18:02 misson20000

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 ? )

ericde45 avatar Feb 24 '18 18:02 ericde45

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

misson20000 avatar Feb 24 '18 19:02 misson20000

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

ericde45 avatar Feb 24 '18 19:02 ericde45

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

roblabla avatar Feb 24 '18 19:02 roblabla

@Alklas as we know the Libnx has JIT support by Plutoo. So can we get vulkan api and enable it in order to enhance ports as doom and emulators? Thanks.

iOS4all avatar Feb 24 '18 19:02 iOS4all

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.

ericde45 avatar Feb 24 '18 19:02 ericde45