Commit Graph

40 Commits

Author SHA1 Message Date
fincs
f381066a43 Add NvColorFormat enum 2018-12-19 19:33:31 +01:00
fincs
b1600c9add gfxGetFramebufferHandle: return id instead of handle 2018-12-19 19:33:31 +01:00
fincs
260f34fa4e NWindow: add several new functions:
- nwindowIsValid
- nwindowGetDimensions
- nwindowSetDimensions
- nwindowSetCrop
- nwindowSetTransform
- nwindowIsConsumerRunningBehind
2018-12-19 19:33:31 +01:00
fincs
bf43284c9f Misc code style fixes, rename NvGraphicBuffer::layers to planes 2018-12-19 19:33:31 +01:00
fincs
4879937946 Introduce Framebuffer, experimental wrapper object around a framebuffer queue for use by software rendering clients 2018-12-19 19:33:31 +01:00
fincs
62aa8e8b23 NWindow: add nwindowReleaseBuffers, which is also done automatically on Close 2018-12-19 19:33:31 +01:00
fincs
c5f8275978 Rename nvMapFree to nvMapClose for consistency reasons 2018-12-19 19:33:31 +01:00
fincs
a9cbd9116a Introduce NWindow, an experimental replacement for the GFX API 2018-12-19 19:33:31 +01:00
fincs
b188f5fb33 gfx.c: fix two single-line bugs 2018-12-19 19:33:31 +01:00
fincs
2af9531f5b Const correctness in bqCancelBuffer 2018-12-19 19:33:31 +01:00
fincs
ec6d878d12 Major buffer producer refactor, see details:
- Introduced NativeHandle (display/types.h)
- Introduced NvGraphicBuffer (nvidia/graphic_buffer.h)
- Renamed BqQueueBufferInput to BqBufferInput
- Renamed BqQueueBufferOutput to BqBufferOutput
- BqGraphicBuffer is now defined and marshalled in a way that matches
  official sw more closely, with a pointer to a NativeHandle instead of
  inline flattened data and other miscellaneous junk
- Const correctness fixes
- bqSetPreallocatedBuffer now has flattening logic for BqGraphicBuffer
- bqRequestBuffer doesn't have this logic for now, passing anything other
  than NULL will fail
- gfx.c updated to use the refactored buffer producer
2018-12-19 19:33:31 +01:00
fincs
d717507541 display/parcel.h: Const correctness fixes 2018-12-19 19:33:31 +01:00
fincs
ae77cbea97 gfx/hid/irs/nv/vi: changes related to sysmodule users, see details:
- Removed hard dependency on applet
- Allow appletGetAppletResourceUserId to fail (using default zero in that case)
- nvInitialize uses nvdrv:s for AppletType_None
- gfx now uses weak global __nx_gfx_vi_service_type for the ViServiceType passed to viInitialize
2018-12-19 19:33:31 +01:00
fincs
3a31df429e gfx: finally get rid of nvgfx, replaced with an NvMap object 2018-12-19 19:33:31 +01:00
fincs
4645ef7004 gfx: Add gfxAppendFence. Remove obsolete comments related to double buffering. 2018-09-16 18:03:35 +02:00
fincs
e3a7187973 gfx: Remove gfxSetDrawFlip. Make 0 the default transform instead of FLIP_V. 2018-08-31 20:14:50 +02:00
fincs
0d1b8bd723 BqQueueBufferInput: add swapInterval field (purpose currently unknown) 2018-08-31 20:11:53 +02:00
fincs
651dd72ac1 Add bqCancelBuffer and use it in gfx.c 2018-08-31 14:14:54 +02:00
fincs
c8ebe8a3b5 buffer_producer: convert Binder error codes to Result values 2018-08-31 14:05:04 +02:00
fincs
a62fae427b Introduce Module_LibnxBinder result codes (based on Android status_t) and binderConvertErrorCode 2018-08-31 13:59:18 +02:00
fincs
819a6f0d89 display/binder.h: refactoring and other changes:
- Removed session_handle/native_handle state
- Consequence of the above: simplified binderCreate/binderInitSession
- Now using viGetSession_IHOSBinderDriverRelay internally
- Changed binderGetNativeHandle to return an Event
- Added readable aliases for binderAdjustRefcount
- gfx: now using async bqDequeueBuffer when the binder event is available
2018-08-31 13:05:23 +02:00
fincs
60cbb68f46 gfx: use new NvFence waiting code 2018-08-31 13:05:23 +02:00
fincs
b26bb6ce76 viGetDisplayVsyncEvent: return an Event instead of a raw handle 2018-08-31 13:05:22 +02:00
fincs
f2f59c75c0 display/gfx.h & buffer_producer.h: Start major refactor, highly WIP 2018-08-31 13:05:22 +02:00
fincs
27f5aecea8 nvgfx: Strip down to bare minimum - remove unused logic 2018-08-31 13:05:22 +02:00
fincs
4e7159ce02 VI service: major revamp, see details:
- Added viOpenDefaultDisplay.
- Replaced viOpenLayer with viCreateLayer.
- NativeWindow parcel data is now parsed by viCreateLayer, and the
  ViLayer struct contains a new igbp_binder_obj_id field.
- LayerFlags/LayerId parameters replaced by weak global variables
  __nx_vi_layer_id/__nx_vi_stray_layer_flags.
- The root vi:* session is closed on startup.
- Simplified corresponding gfx code.
- Misc style fixes
2018-08-31 13:05:22 +02:00
fincs
180cd9b550 display/parcel.h: publish ParcelHeader struct 2018-08-31 13:05:22 +02:00
Jules Blok
e234129598 gfx: Add a buffer index to gfxGetFramebufferHandle(). 2018-08-31 13:05:22 +02:00
Jules Blok
4f331eb9f7 gfx: Add function to query framebuffer pitch. 2018-08-31 13:05:22 +02:00
Jules Blok
06e50f74ab gfx: Add a call to get the framebuffer nvmap handle. 2018-08-31 13:05:22 +02:00
plutooo
cff044f497 Implement 3d_ctx 2018-08-31 13:05:21 +02:00
plutooo
e7daaf1e71 Hide nv tmem size from gfx 2018-08-31 13:05:21 +02:00
plutooo
efacee6956 Simplify nv 2018-08-31 13:05:21 +02:00
plutooo
4bd1d3313c Fix nvgfx, add nvinfo 2018-08-31 13:05:21 +02:00
plutooo
f6aa4e3d52 Minimize nvgfx.c 2018-08-31 13:05:21 +02:00
plutooo
b24f6babbb Make compilable 2018-08-31 13:05:21 +02:00
plutooo
04751087ca Stylechanges to binder, and implemented gpu address space 2018-08-31 13:05:21 +02:00
plutooo
cd753b1b58 Implemented nvmap.c 2018-08-31 13:05:21 +02:00
plutooo
112b2b5d8e Move nvidia driver to nvidia/ 2018-08-31 13:05:21 +02:00
plutooo
d8bb563546 Renamed gfx/ to display/ 2018-08-31 13:05:21 +02:00