ipc: Pass all arguments to create swapchain image

This commit is contained in:
Jakob Bornecrantz 2020-05-27 19:48:09 +01:00
parent efd35da334
commit e8e7493679
4 changed files with 24 additions and 15 deletions

View file

@ -179,9 +179,15 @@ ipc_compositor_swapchain_create(struct xrt_compositor *xc,
uint64_t size;
r = ipc_call_swapchain_create(icc->ipc_c, // connection
create, // in
bits, // in
format, // in
sample_count, // in
width, // in
height, // in
format, // in
face_count, // in
array_size, // in
mip_count, // in
&handle, // out
&num_images, // out
&size, // out

View file

@ -12,6 +12,7 @@
#include "xrt/xrt_tracking.h"
#include "xrt/xrt_device.h"
#include "xrt/xrt_compiler.h"
#include "xrt/xrt_compositor.h"
#include <semaphore.h>

View file

@ -118,9 +118,15 @@ ipc_handle_compositor_layer_sync(volatile struct ipc_client_state *cs,
ipc_result_t
ipc_handle_swapchain_create(volatile struct ipc_client_state *cs,
enum xrt_swapchain_create_flags create,
enum xrt_swapchain_usage_bits bits,
int64_t format,
uint32_t sample_count,
uint32_t width,
uint32_t height,
uint64_t format,
uint32_t face_count,
uint32_t array_size,
uint32_t mip_count,
uint32_t *out_id,
uint32_t *out_num_images,
uint64_t *out_size,
@ -128,21 +134,11 @@ ipc_handle_swapchain_create(volatile struct ipc_client_state *cs,
int *out_fds,
size_t *out_num_fds)
{
enum xrt_swapchain_create_flags flags =
XRT_SWAPCHAIN_CREATE_STATIC_IMAGE;
enum xrt_swapchain_usage_bits usage =
XRT_SWAPCHAIN_CREATE_STATIC_IMAGE | XRT_SWAPCHAIN_USAGE_COLOR;
uint32_t sample_count = 1;
uint32_t face_count = 1;
uint32_t array_size = 1;
uint32_t mip_count = 1;
// create the swapchain
struct xrt_swapchain *xsc =
xrt_comp_create_swapchain(cs->xc, // Compositor
flags, // Flags
usage, // Usage
create, // Flags
bits, // Usage
format, // Format
sample_count, // Sample count
width, // Width

View file

@ -31,9 +31,15 @@
"swapchain_create": {
"in": [
{"name": "create", "type": "enum xrt_swapchain_create_flags"},
{"name": "bits", "type": "enum xrt_swapchain_usage_bits"},
{"name": "format", "type": "int64_t"},
{"name": "sample_count", "type": "uint32_t"},
{"name": "width", "type": "uint32_t"},
{"name": "height", "type": "uint32_t"},
{"name": "format", "type": "uint64_t"}
{"name": "face_count", "type": "uint32_t"},
{"name": "array_size", "type": "uint32_t"},
{"name": "mip_count", "type": "uint32_t"}
],
"out": [
{"name": "id", "type": "uint32_t"},