From 968c7312b26e3b61f13885c90713e85bbb4cee64 Mon Sep 17 00:00:00 2001 From: dmaivel Date: Mon, 23 Sep 2024 18:15:08 -0400 Subject: [PATCH] Clarification in README, properly inlay functions --- README.md | 18 +++++++++--------- src/server/processor.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3425308..44fffa7 100644 --- a/README.md +++ b/README.md @@ -24,27 +24,23 @@ SharedGL is an OpenGL implementation that enables 3D acceleration for Windows an # Getting started -The following libraries are required for building the server (and client) on Linux: +The following libraries are required for building the server on Linux: - libepoxy - SDL2 -- libx11 -The following script builds: `sglrenderer` and `libGL` for Linux: +The following script builds `sglrenderer` for Linux: ```bash git clone https://github.com/dmaivel/sharedgl.git cd sharedgl mkdir build cd build cmake .. -cmake --build . --config Release +cmake --build . --target sglrenderer --config Release ``` -If on Windows (Visual Studio required), you must specify that you only want to build the library, `sharedglXX.dll`: -``` -cmake --build . --target sharedgl-core --config Release -``` +If you also wish to build the client library for Linux, `libx11` is required. Build with `--target sharedgl-core`. -For detailed build instructions for Windows, visit the [Windows section](#windows-in-a-vm). +For detailed build instructions for Windows, visit the [Windows section](#windows-in-a-vm). The renderer/server is only supported on Linux hosts. ### Build options @@ -156,6 +152,10 @@ There are two ways to install the library on windows: ``` ## Linux + +> [!IMPORTANT] +> The following sections discuss using the *client library*, not the *renderer/server*. If your intention is to only accelerate Windows guests, you may disregard this section as all you need to do is run the renderer, no additional libraries required (other than the dependencies). + For your OpenGL application to communicate with the server, the client library must be specified in your library path. Upon exporting, any program you run in the terminal where you inputted this command will run with the SGL binary. ```bash diff --git a/src/server/processor.c b/src/server/processor.c index 437ce50..eb770d5 100644 --- a/src/server/processor.c +++ b/src/server/processor.c @@ -115,7 +115,7 @@ static void scramble(int *arr, int n) } } -static FORCEINLINE void wait_shm(void *p, int *client_id) +static FORCEINLINE inline void wait_shm(void *p, int *client_id) { /* * not only wait for a submit from a specific client, @@ -272,7 +272,7 @@ static void sgl_net_get_fifo_upload(void *p, int *client_id, bool *ready_to_rend } } -static FORCEINLINE void wait_net(void *p, int *client_id, struct net_context *net_ctx, struct sgl_cmd_processor_args args, +static FORCEINLINE inline void wait_net(void *p, int *client_id, struct net_context *net_ctx, struct sgl_cmd_processor_args args, size_t framebuffer_size, size_t fifo_size, int width, int height) { bool ready_to_render = false;