index, sample_count, out_value[0], out_value[1]);
}
+static void virgl_send_tweaks(struct virgl_context *vctx, struct virgl_screen *rs)
+{
+}
+
struct pipe_context *virgl_context_create(struct pipe_screen *pscreen,
void *priv,
unsigned flags)
virgl_encode_host_debug_flagstring(vctx, host_debug_flagstring);
}
+ if (rs->caps.caps.v2.capability_bits & VIRGL_CAP_APP_TWEAK_SUPPORT)
+ virgl_send_tweaks(vctx, rs);
+
return &vctx->base;
fail:
virgl_context_destroy(&vctx->base);
return 0;
}
+int virgl_encode_tweak(struct virgl_context *ctx, enum vrend_tweak_type tweak, uint32_t value)
+{
+ virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_SET_TWEAKS, 0, VIRGL_SET_TWEAKS_SIZE));
+ virgl_encoder_write_dword(ctx->cbuf, tweak);
+ virgl_encoder_write_dword(ctx->cbuf, value);
+ return 0;
+}
+
+
int virgl_encode_get_query_result_qbo(struct virgl_context *ctx,
uint32_t handle,
struct virgl_resource *res, boolean wait,
#include "pipe/p_state.h"
#include "virgl_winsys.h"
+#include "virgl_protocol.h"
struct tgsi_token;
struct virgl_transfer *trans);
void virgl_encode_end_transfers(struct virgl_cmd_buf *buf);
+
+int virgl_encode_tweak(struct virgl_context *ctx, enum vrend_tweak_type tweak, uint32_t value);
+
#endif
#define VIRGL_CAP_INDIRECT_INPUT_ADDR (1 << 25)
#define VIRGL_CAP_COPY_TRANSFER (1 << 26)
#define VIRGL_CAP_CLIP_HALFZ (1 << 27)
+#define VIRGL_CAP_APP_TWEAK_SUPPORT (1 << 28)
/* virgl bind flags - these are compatible with mesa 10.5 gallium.
* but are fixed, no other should be passed to virgl either.
VIRGL_CCMD_TRANSFER3D,
VIRGL_CCMD_END_TRANSFERS,
VIRGL_CCMD_COPY_TRANSFER3D,
+ VIRGL_CCMD_SET_TWEAKS,
};
/*
#define VIRGL_COPY_TRANSFER3D_SRC_RES_OFFSET 13
#define VIRGL_COPY_TRANSFER3D_SYNCHRONIZED 14
+/* set tweak flags */
+#define VIRGL_SET_TWEAKS_SIZE 2
+#define VIRGL_SET_TWEAKS_ID 1
+#define VIRGL_SET_TWEAKS_VALUE 2
+
+enum vrend_tweak_type {
+ virgl_tweak_undefined
+};
+
#endif