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
5e343752
Commit
5e343752
authored
Jun 11, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Jun 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Parse sampler declarations.
parent
de11f800
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
0 deletions
+45
-0
d3dcompiler_private.h
dlls/d3dcompiler_43/d3dcompiler_private.h
+10
-0
hlsl.y
dlls/d3dcompiler_43/hlsl.y
+25
-0
utils.c
dlls/d3dcompiler_43/utils.c
+10
-0
No files found.
dlls/d3dcompiler_43/d3dcompiler_private.h
View file @
5e343752
...
...
@@ -644,6 +644,15 @@ enum hlsl_base_type
HLSL_TYPE_VOID
,
};
enum
hlsl_sampler_dim
{
HLSL_SAMPLER_DIM_GENERIC
,
HLSL_SAMPLER_DIM_1D
,
HLSL_SAMPLER_DIM_2D
,
HLSL_SAMPLER_DIM_3D
,
HLSL_SAMPLER_DIM_CUBE
,
};
enum
hlsl_matrix_majority
{
HLSL_COLUMN_MAJOR
,
...
...
@@ -656,6 +665,7 @@ struct hlsl_type
struct
list
scope_entry
;
enum
hlsl_type_class
type
;
enum
hlsl_base_type
base_type
;
enum
hlsl_sampler_dim
sampler_dim
;
const
char
*
name
;
unsigned
int
modifiers
;
unsigned
int
dimx
;
...
...
dlls/d3dcompiler_43/hlsl.y
View file @
5e343752
...
...
@@ -343,6 +343,31 @@ base_type: KW_VOID
{
$$ = new_hlsl_type("void", HLSL_CLASS_SCALAR, HLSL_TYPE_VOID, 1, 1);
}
| KW_SAMPLER
{
$$ = new_hlsl_type("sampler", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
$$->sampler_dim = HLSL_SAMPLER_DIM_GENERIC;
}
| KW_SAMPLER1D
{
$$ = new_hlsl_type("sampler1D", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
$$->sampler_dim = HLSL_SAMPLER_DIM_1D;
}
| KW_SAMPLER2D
{
$$ = new_hlsl_type("sampler2D", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
$$->sampler_dim = HLSL_SAMPLER_DIM_2D;
}
| KW_SAMPLER3D
{
$$ = new_hlsl_type("sampler3D", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
$$->sampler_dim = HLSL_SAMPLER_DIM_3D;
}
| KW_SAMPLERCUBE
{
$$ = new_hlsl_type("samplerCUBE", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
$$->sampler_dim = HLSL_SAMPLER_DIM_CUBE;
}
| TYPE_IDENTIFIER
{
struct hlsl_type *type;
...
...
dlls/d3dcompiler_43/utils.c
View file @
5e343752
...
...
@@ -897,6 +897,16 @@ static const char *debug_base_type(const struct hlsl_type *type)
case
HLSL_TYPE_INT
:
name
=
"int"
;
break
;
case
HLSL_TYPE_UINT
:
name
=
"uint"
;
break
;
case
HLSL_TYPE_BOOL
:
name
=
"bool"
;
break
;
case
HLSL_TYPE_SAMPLER
:
switch
(
type
->
sampler_dim
)
{
case
HLSL_SAMPLER_DIM_GENERIC
:
name
=
"sampler"
;
break
;
case
HLSL_SAMPLER_DIM_1D
:
name
=
"sampler1D"
;
break
;
case
HLSL_SAMPLER_DIM_2D
:
name
=
"sampler2D"
;
break
;
case
HLSL_SAMPLER_DIM_3D
:
name
=
"sampler3D"
;
break
;
case
HLSL_SAMPLER_DIM_CUBE
:
name
=
"samplerCUBE"
;
break
;
}
break
;
default:
FIXME
(
"Unhandled case %u
\n
"
,
type
->
base_type
);
}
...
...
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