Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a44681e1
Commit
a44681e1
authored
Mar 10, 2024
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Wrap fx_4_x output in a dxbc container.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
d01ae151
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
compiler.c
dlls/d3dcompiler_43/compiler.c
+14
-0
d3dcompiler_private.h
dlls/d3dcompiler_43/d3dcompiler_private.h
+1
-0
No files found.
dlls/d3dcompiler_43/compiler.c
View file @
a44681e1
...
...
@@ -601,6 +601,20 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
return
S_OK
;
}
/* Unlike other effect profiles fx_4_x is using DXBC container. */
if
(
!
strcmp
(
profile
,
"fx_4_0"
)
||
!
strcmp
(
profile
,
"fx_4_1"
))
{
struct
vkd3d_shader_dxbc_section_desc
section
=
{
.
tag
=
TAG_FX10
,
.
data
=
byte_code
};
struct
vkd3d_shader_code
dxbc
;
ret
=
vkd3d_shader_serialize_dxbc
(
1
,
&
section
,
&
dxbc
,
NULL
);
vkd3d_shader_free_shader_code
(
&
byte_code
);
if
(
ret
)
return
hresult_from_vkd3d_result
(
ret
);
byte_code
=
dxbc
;
}
if
(
SUCCEEDED
(
hr
=
D3DCreateBlob
(
byte_code
.
size
,
shader_blob
)))
memcpy
(
ID3D10Blob_GetBufferPointer
(
*
shader_blob
),
byte_code
.
code
,
byte_code
.
size
);
...
...
dlls/d3dcompiler_43/d3dcompiler_private.h
View file @
a44681e1
...
...
@@ -523,6 +523,7 @@ void SlDeleteShader(struct bwriter_shader *shader);
((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
#define TAG_Aon9 MAKE_TAG('A', 'o', 'n', '9')
#define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
#define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
#define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
#define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N')
#define TAG_OSG5 MAKE_TAG('O', 'S', 'G', '5')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment