#define SVGA_FENCE_FLAG_EXEC (1 << 0)
#define SVGA_FENCE_FLAG_QUERY (1 << 1)
-#define SVGA_SURFACE_USAGE_SHARED (1 << 0)
-#define SVGA_SURFACE_USAGE_SCANOUT (1 << 1)
+#define SVGA_SURFACE_USAGE_SHARED (1 << 0)
+#define SVGA_SURFACE_USAGE_SCANOUT (1 << 1)
+#define SVGA_SURFACE_USAGE_COHERENT (1 << 2)
#define SVGA_QUERY_FLAG_SET (1 << 0)
#define SVGA_QUERY_FLAG_REF (1 << 1)
SVGA_STATS_TIME_CREATEGS,
SVGA_STATS_TIME_CREATESURFACE,
SVGA_STATS_TIME_CREATESURFACEVIEW,
+ SVGA_STATS_TIME_CREATETCS,
+ SVGA_STATS_TIME_CREATETES,
SVGA_STATS_TIME_CREATETEXTURE,
SVGA_STATS_TIME_CREATEVS,
SVGA_STATS_TIME_DEFINESHADER,
SVGA_STATS_TIME_DRAWELEMENTS,
SVGA_STATS_TIME_EMITFS,
SVGA_STATS_TIME_EMITGS,
+ SVGA_STATS_TIME_EMITTCS,
+ SVGA_STATS_TIME_EMITTES,
SVGA_STATS_TIME_EMITVS,
SVGA_STATS_TIME_EMULATESURFACEVIEW,
SVGA_STATS_TIME_FENCEFINISH,
SVGA_STATS_PREFIX "CreateGS", \
SVGA_STATS_PREFIX "CreateSurface", \
SVGA_STATS_PREFIX "CreateSurfaceView", \
+ SVGA_STATS_PREFIX "CreateTCS", \
+ SVGA_STATS_PREFIX "CreateTES", \
SVGA_STATS_PREFIX "CreateTexture", \
SVGA_STATS_PREFIX "CreateVS", \
SVGA_STATS_PREFIX "DefineShader", \
SVGA_STATS_PREFIX "DrawElements", \
SVGA_STATS_PREFIX "EmitFS", \
SVGA_STATS_PREFIX "EmitGS", \
+ SVGA_STATS_PREFIX "EmitTCS", \
+ SVGA_STATS_PREFIX "EmitTES", \
SVGA_STATS_PREFIX "EmitVS", \
SVGA_STATS_PREFIX "EmulateSurfaceView", \
SVGA_STATS_PREFIX "FenceFinish", \
**/
boolean have_gb_objects;
+ boolean force_coherent;
/**
* Map a guest-backed surface.
+ * \param swc The winsys context
+ * \param surface The surface to map
* \param flags bitmaks of PIPE_TRANSFER_x flags
+ * \param retry Whether to flush and retry the map
+ * \param rebind Whether to issue an immediate rebind and flush.
*
* The surface_map() member is allowed to fail due to a
* shortage of command buffer space, if the
void *
(*surface_map)(struct svga_winsys_context *swc,
struct svga_winsys_surface *surface,
- unsigned flags, boolean *retry);
+ unsigned flags, boolean *retry,
+ boolean *rebind);
/**
* Unmap a guest-backed surface.
struct svga_winsys_surface *surface,
boolean *rebind);
- /**
- * Invalidate the content of this surface
- */
- enum pipe_error
- (*surface_invalidate)(struct svga_winsys_context *swc,
- struct svga_winsys_surface *surface);
-
/**
* Create and define a DX GB shader that resides in the device COTable.
* Caller of this function will issue the DXDefineShader command.
uint32 shaderId,
SVGA3dShaderType shaderType,
const uint32 *bytecode,
- uint32 bytecodeLen);
+ uint32 bytecodeLen,
+ const SVGA3dDXShaderSignatureHeader *sgnInfo,
+ uint32 sgnLen);
/**
* Destroy a DX GB shader.
struct svga_winsys_gb_shader *shader,
unsigned flags);
- /** To report perf/conformance/etc issues to the state tracker */
+ /** To report perf/conformance/etc issues to the gallium frontend */
struct pipe_debug_callback *debug_callback;
/** The more recent command issued to command buffer */
/** For HUD queries */
uint64_t num_commands;
+ uint64_t num_command_buffers;
uint64_t num_draw_commands;
+ uint64_t num_shader_reloc;
+ uint64_t num_surf_reloc;
+
+ /* Whether we are in retry processing */
+ unsigned int in_retry;
};
*/
struct svga_winsys_surface *
(*surface_create)(struct svga_winsys_screen *sws,
- SVGA3dSurface1Flags flags,
+ SVGA3dSurfaceAllFlags flags,
SVGA3dSurfaceFormat format,
unsigned usage,
SVGA3dSize size,
SVGA3dSurfaceFormat format,
SVGA3dSize size,
uint32 numLayers,
- uint32 numMipLevels);
+ uint32 numMipLevels,
+ uint32 numSamples);
+
+ void
+ (*surface_init)(struct svga_winsys_screen *sws,
+ struct svga_winsys_surface *surface,
+ unsigned surf_size, SVGA3dSurfaceAllFlags flags);
/**
* Buffer management. Buffer attributes are mostly fixed over its lifetime.
/** Can we do DMA with guest-backed objects enabled? */
bool have_gb_dma;
+ /** Do we support coherent surface memory? */
+ bool have_coherent;
/**
* Create and define a GB shader.
*/
void
(*stats_time_pop)();
+ /**
+ * Send a host log message
+ */
+ void
+ (*host_log)(struct svga_winsys_screen *sws, const char *message);
/** Have VGPU v10 hardware? */
boolean have_vgpu10;
+ /** Have SM4_1 hardware? */
+ boolean have_sm4_1;
+
+ /** Have SM5 hardware? */
+ boolean have_sm5;
+
/** To rebind resources at the beginnning of a new command buffer */
boolean need_to_rebind_resources;
boolean have_set_predication_cmd;
boolean have_transfer_from_buffer_cmd;
boolean have_fence_fd;
+ boolean have_intra_surface_copy;
+ boolean have_constant_buffer_offset_cmd;
};