1 | /* $Id: DevVGA-SVGA3d-dx-shader.h 94232 2022-03-15 08:47:10Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * DevVGA - VMWare SVGA device - VGPU10+ (DX) shader utilities.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2020-2022 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_dx_shader_h
|
---|
19 | #define VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_dx_shader_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #ifndef VMSVGA3D_DX
|
---|
25 | # error "This include file is for VMSVGA3D_DX."
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | #include <iprt/types.h>
|
---|
29 |
|
---|
30 | #include "vmsvga_headers_begin.h"
|
---|
31 | #pragma pack(1) /* VMSVGA structures are '__packed'. */
|
---|
32 | #include <svga3d_reg.h>
|
---|
33 | #include <VGPU10ShaderTokens.h>
|
---|
34 | #pragma pack()
|
---|
35 | #include "vmsvga_headers_end.h"
|
---|
36 |
|
---|
37 | typedef struct DXShaderInfo
|
---|
38 | {
|
---|
39 | VGPU10_PROGRAM_TYPE enmProgramType;
|
---|
40 | void *pvBytecode;
|
---|
41 | uint32_t cbBytecode;
|
---|
42 | uint32_t cInputSignature;
|
---|
43 | uint32_t cOutputSignature;
|
---|
44 | uint32_t cPatchConstantSignature;
|
---|
45 | uint32_t cDclResource;
|
---|
46 | SVGA3dDXSignatureEntry aInputSignature[32];
|
---|
47 | SVGA3dDXSignatureEntry aOutputSignature[32];
|
---|
48 | SVGA3dDXSignatureEntry aPatchConstantSignature[32];
|
---|
49 | uint32_t aOffDclResource[SVGA3D_DX_MAX_SRVIEWS];
|
---|
50 | } DXShaderInfo;
|
---|
51 |
|
---|
52 | int DXShaderParse(void const *pvCode, uint32_t cbCode, DXShaderInfo *pInfo);
|
---|
53 | void DXShaderFree(DXShaderInfo *pInfo);
|
---|
54 | int DXShaderUpdateResourceTypes(DXShaderInfo const *pInfo, VGPU10_RESOURCE_DIMENSION *paResourceType, uint32_t cResourceType);
|
---|
55 | int DXShaderCreateDXBC(DXShaderInfo const *pInfo, void **ppvDXBC, uint32_t *pcbDXBC);
|
---|
56 | char const *DXShaderGetOutputSemanticName(DXShaderInfo const *pInfo, uint32_t idxRegister);
|
---|
57 |
|
---|
58 | #endif /* !VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_dx_shader_h */
|
---|