mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
drm/vmwgfx: Add support for UA view commands
Virtual device now support new commands to manage unordered access views. Allow them as part of user-space command buffer. This involves adding UA view cotable, binding tracker info, new view type and command verifier functions. v2: fix comment typo v3: style fixes (don't use deprecated PTR_RET) Signed-off-by: Deepak Rawat <drawat.floss@gmail.com> Signed-off-by: Neha Bhende <bhenden@vmware.com> Reviewed-by: Thomas Hellström (VMware) <thomas_os@shipmail.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
committed by
Roland Scheidegger
parent
d2e90ab374
commit
5e8ec0d919
@@ -30,6 +30,7 @@ enum vmw_view_type {
|
||||
vmw_view_sr,
|
||||
vmw_view_rt,
|
||||
vmw_view_ds,
|
||||
vmw_view_ua,
|
||||
vmw_view_max,
|
||||
};
|
||||
|
||||
@@ -61,6 +62,7 @@ union vmw_view_destroy {
|
||||
struct SVGA3dCmdDXDestroyRenderTargetView rtv;
|
||||
struct SVGA3dCmdDXDestroyShaderResourceView srv;
|
||||
struct SVGA3dCmdDXDestroyDepthStencilView dsv;
|
||||
struct SVGA3dCmdDXDestroyUAView uav;
|
||||
u32 view_id;
|
||||
};
|
||||
|
||||
@@ -87,6 +89,10 @@ static inline enum vmw_view_type vmw_view_cmd_to_type(u32 id)
|
||||
{
|
||||
u32 tmp = (id - SVGA_3D_CMD_DX_DEFINE_SHADERRESOURCE_VIEW) / 2;
|
||||
|
||||
if (id == SVGA_3D_CMD_DX_DEFINE_UA_VIEW ||
|
||||
id == SVGA_3D_CMD_DX_DESTROY_UA_VIEW)
|
||||
return vmw_view_ua;
|
||||
|
||||
if (tmp > (u32)vmw_view_max)
|
||||
return vmw_view_max;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user