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
1d160bed
Commit
1d160bed
authored
Jan 12, 2011
by
Matteo Bruni
Committed by
Alexandre Julliard
May 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Improve some parameter names and fix code style.
parent
86b68215
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
+22
-23
compiler.c
dlls/d3dcompiler_43/compiler.c
+22
-23
No files found.
dlls/d3dcompiler_43/compiler.c
View file @
1d160bed
...
@@ -390,8 +390,8 @@ cleanup:
...
@@ -390,8 +390,8 @@ cleanup:
return
hr
;
return
hr
;
}
}
static
HRESULT
assemble_shader
(
const
char
*
preproc
Shader
,
const
char
*
preprocM
essages
,
static
HRESULT
assemble_shader
(
const
char
*
preproc
_shader
,
const
char
*
preproc_m
essages
,
LPD3DBLOB
*
ppShader
,
LPD3DBLOB
*
ppErrorMsg
s
)
ID3DBlob
**
shader_blob
,
ID3DBlob
**
error_message
s
)
{
{
struct
bwriter_shader
*
shader
;
struct
bwriter_shader
*
shader
;
char
*
messages
=
NULL
;
char
*
messages
=
NULL
;
...
@@ -401,51 +401,50 @@ static HRESULT assemble_shader(const char *preprocShader, const char *preprocMes
...
@@ -401,51 +401,50 @@ static HRESULT assemble_shader(const char *preprocShader, const char *preprocMes
int
size
;
int
size
;
char
*
pos
;
char
*
pos
;
shader
=
SlAssembleShader
(
preproc
S
hader
,
&
messages
);
shader
=
SlAssembleShader
(
preproc
_s
hader
,
&
messages
);
if
(
messages
||
preprocM
essages
)
if
(
messages
||
preproc_m
essages
)
{
{
if
(
preprocM
essages
)
if
(
preproc_m
essages
)
{
{
TRACE
(
"Preprocessor messages:
\n
"
);
TRACE
(
"Preprocessor messages:
\n
"
);
TRACE
(
"%s"
,
preproc
M
essages
);
TRACE
(
"%s"
,
preproc
_m
essages
);
}
}
if
(
messages
)
if
(
messages
)
{
{
TRACE
(
"Assembler messages:
\n
"
);
TRACE
(
"Assembler messages:
\n
"
);
TRACE
(
"%s"
,
messages
);
TRACE
(
"%s"
,
messages
);
}
}
TRACE
(
"Shader source:
\n
"
);
TRACE
(
"Shader source:
\n
"
);
TRACE
(
"%s
\n
"
,
debugstr_a
(
preproc
S
hader
));
TRACE
(
"%s
\n
"
,
debugstr_a
(
preproc
_s
hader
));
if
(
ppErrorMsg
s
)
if
(
error_message
s
)
{
{
size
=
(
messages
?
strlen
(
messages
)
:
0
)
+
size
=
(
messages
?
strlen
(
messages
)
:
0
)
+
(
preproc
Messages
?
strlen
(
preprocM
essages
)
:
0
)
+
1
;
(
preproc
_messages
?
strlen
(
preproc_m
essages
)
:
0
)
+
1
;
hr
=
D3DCreateBlob
(
size
,
&
buffer
);
hr
=
D3DCreateBlob
(
size
,
&
buffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
HeapFree
(
GetProcessHeap
(),
0
,
messages
);
HeapFree
(
GetProcessHeap
(),
0
,
messages
);
if
(
shader
)
SlDeleteShader
(
shader
);
if
(
shader
)
SlDeleteShader
(
shader
);
return
hr
;
return
hr
;
}
}
pos
=
ID3D10Blob_GetBufferPointer
(
buffer
);
pos
=
ID3D10Blob_GetBufferPointer
(
buffer
);
if
(
preprocM
essages
)
if
(
preproc_m
essages
)
{
{
CopyMemory
(
pos
,
preproc
Messages
,
strlen
(
preprocM
essages
)
+
1
);
CopyMemory
(
pos
,
preproc
_messages
,
strlen
(
preproc_m
essages
)
+
1
);
pos
+=
strlen
(
preproc
M
essages
);
pos
+=
strlen
(
preproc
_m
essages
);
}
}
if
(
messages
)
if
(
messages
)
CopyMemory
(
pos
,
messages
,
strlen
(
messages
)
+
1
);
CopyMemory
(
pos
,
messages
,
strlen
(
messages
)
+
1
);
*
ppErrorMsg
s
=
buffer
;
*
error_message
s
=
buffer
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
messages
);
HeapFree
(
GetProcessHeap
(),
0
,
messages
);
}
}
if
(
shader
==
NULL
)
if
(
shader
==
NULL
)
{
{
ERR
(
"Asm reading failed
\n
"
);
ERR
(
"Asm reading failed
\n
"
);
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
...
@@ -453,23 +452,23 @@ static HRESULT assemble_shader(const char *preprocShader, const char *preprocMes
...
@@ -453,23 +452,23 @@ static HRESULT assemble_shader(const char *preprocShader, const char *preprocMes
hr
=
SlWriteBytecode
(
shader
,
9
,
&
res
);
hr
=
SlWriteBytecode
(
shader
,
9
,
&
res
);
SlDeleteShader
(
shader
);
SlDeleteShader
(
shader
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
ERR
(
"SlWriteBytecode failed with 0x%08x
\n
"
,
hr
);
ERR
(
"SlWriteBytecode failed with 0x%08x
\n
"
,
hr
);
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
}
}
if
(
ppShader
)
if
(
shader_blob
)
{
{
size
=
HeapSize
(
GetProcessHeap
(),
0
,
res
);
size
=
HeapSize
(
GetProcessHeap
(),
0
,
res
);
hr
=
D3DCreateBlob
(
size
,
&
buffer
);
hr
=
D3DCreateBlob
(
size
,
&
buffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
HeapFree
(
GetProcessHeap
(),
0
,
res
);
HeapFree
(
GetProcessHeap
(),
0
,
res
);
return
hr
;
return
hr
;
}
}
CopyMemory
(
ID3D10Blob_GetBufferPointer
(
buffer
),
res
,
size
);
CopyMemory
(
ID3D10Blob_GetBufferPointer
(
buffer
),
res
,
size
);
*
ppShader
=
buffer
;
*
shader_blob
=
buffer
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
res
);
HeapFree
(
GetProcessHeap
(),
0
,
res
);
...
...
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