#include "xf86drm.h"
#define __user
-#include "vc4_drm.h"
+#include "drm-uapi/vc4_drm.h"
#include "vc4_bufmgr.h"
#include "vc4_resource.h"
#include "vc4_cl.h"
struct pipe_shader_state base;
};
-struct vc4_ubo_range {
- /**
- * offset in bytes from the start of the ubo where this range is
- * uploaded.
- *
- * Only set once used is set.
- */
- uint32_t dst_offset;
-
- /**
- * offset in bytes from the start of the gallium uniforms where the
- * data comes from.
- */
- uint32_t src_offset;
-
- /** size in bytes of this ubo range */
- uint32_t size;
-};
-
struct vc4_fs_inputs {
/**
* Array of the meanings of the VPM inputs this shader needs.
struct vc4_shader_uniform_info uniforms;
- struct vc4_ubo_range *ubo_ranges;
- uint32_t num_ubo_ranges;
- uint32_t ubo_size;
/**
* VC4_DIRTY_* flags that, when set in vc4->dirty, mean that the
* uniforms have to be rewritten (and therefore the shader state
struct pipe_viewport_state viewport;
struct vc4_constbuf_stateobj constbuf[PIPE_SHADER_TYPES];
struct vc4_vertexbuf_stateobj vertexbuf;
+ struct pipe_debug_callback debug;
struct vc4_hwperfmon *perfmon;
/** @} */
/** Handle of syncobj containing the last submitted job fence. */
uint32_t job_syncobj;
+
+ int in_fence_fd;
+ /** Handle of the syncobj that holds in_fence_fd for submission. */
+ uint32_t in_syncobj;
};
struct vc4_rasterizer_state {
#define perf_debug(...) do { \
if (unlikely(vc4_debug & VC4_DEBUG_PERF)) \
fprintf(stderr, __VA_ARGS__); \
+ if (unlikely(vc4->debug.debug_message)) \
+ pipe_debug_message(&vc4->debug, PERF_INFO, __VA_ARGS__); \
} while (0)
static inline struct vc4_context *
void vc4_query_init(struct pipe_context *pctx);
void vc4_simulator_init(struct vc4_screen *screen);
void vc4_simulator_destroy(struct vc4_screen *screen);
-int vc4_simulator_flush(struct vc4_context *vc4,
- struct drm_vc4_submit_cl *args,
- struct vc4_job *job);
int vc4_simulator_ioctl(int fd, unsigned long request, void *arg);
-void vc4_simulator_open_from_handle(int fd, uint32_t winsys_stride,
- int handle, uint32_t size);
+void vc4_simulator_open_from_handle(int fd, int handle, uint32_t size);
static inline int
vc4_ioctl(int fd, unsigned long request, void *arg)
void vc4_flush(struct pipe_context *pctx);
int vc4_job_init(struct vc4_context *vc4);
+int vc4_fence_context_init(struct vc4_context *vc4);
struct vc4_job *vc4_get_job(struct vc4_context *vc4,
struct pipe_surface *cbuf,
struct pipe_surface *zsbuf);