Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wine
vkd3d
Commits
31ea11fb
Commit
31ea11fb
authored
4 months ago
by
Henri Verbeet
Browse files
Options
Downloads
Patches
Plain Diff
tests/shader_runner: Ignore the "backcompat" option for shader model 5.1+.
parent
d164752e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1329
tests/shader_runner: Ignore the "backcompat" option for shader model 5.1+.
Pipeline
#36077
skipped
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/hlsl/sampler-state.shader_test
+3
-1
3 additions, 1 deletion
tests/hlsl/sampler-state.shader_test
tests/hlsl/sampler.shader_test
+1
-1
1 addition, 1 deletion
tests/hlsl/sampler.shader_test
tests/shader_runner.c
+20
-5
20 additions, 5 deletions
tests/shader_runner.c
with
24 additions
and
7 deletions
tests/hlsl/sampler-state.shader_test
+
3
−
1
View file @
31ea11fb
...
...
@@ -135,7 +135,7 @@ float4 main(): sv_target
}
[pixel shader fail(sm>=
5.1) todo(sm>=5.1
)]
[pixel shader fail(sm>=
6
)]
// default value initializers make it more permissive but if types don't match
// then the whole initializer is discarded.
float4 f = {
...
...
@@ -206,6 +206,8 @@ float4 main(): sv_target
[require]
shader model >= 5.0
% Segfaults with 5.1 on d3dcompiler_47 10.0.19041.868
shader model < 5.1
options: backcompat
[pixel shader fail(sm>=5.1) todo(sm>=5.1)]
...
...
This diff is collapsed.
Click to expand it.
tests/hlsl/sampler.shader_test
+
1
−
1
View file @
31ea11fb
...
...
@@ -75,7 +75,7 @@ size (2d, 3, 3)
0.0 1.0 0.0 1.0 1.0 1.0 0.0 1.0 2.0 1.0 0.0 1.0
0.0 2.0 0.0 1.0 1.0 2.0 0.0 1.0 2.0 2.0 0.0 1.0
[pixel shader fail(sm>=
6
)]
[pixel shader fail(sm>=
5.1) todo(sm>=5.1
)]
sampler s;
float4 f;
...
...
This diff is collapsed.
Click to expand it.
tests/shader_runner.c
+
20
−
5
View file @
31ea11fb
...
...
@@ -1612,6 +1612,7 @@ static HRESULT dxc_compiler_compile_shader(void *dxc_compiler, enum shader_type
ID3D10Blob
*
compile_hlsl
(
const
struct
shader_runner
*
runner
,
enum
shader_type
type
)
{
const
char
*
source
=
runner
->
shader_source
[
type
];
unsigned
int
options
=
runner
->
compile_options
;
ID3D10Blob
*
blob
=
NULL
,
*
errors
=
NULL
;
char
profile
[
7
];
HRESULT
hr
;
...
...
@@ -1627,16 +1628,22 @@ ID3D10Blob *compile_hlsl(const struct shader_runner *runner, enum shader_type ty
[
SHADER_MODEL_6_0
]
=
"6_0"
,
};
/* Behaviour is inconsistent between different versions of
* d3dcompiler_47.dll. Version 10.0.17134.12 seems to reject
* D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY for 5.1 profiles, while
* version 10.0.10150.0 apparently doesn't. */
if
(
runner
->
minimum_shader_model
>=
SHADER_MODEL_5_1
)
options
&=
~
D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY
;
if
(
runner
->
minimum_shader_model
>=
SHADER_MODEL_6_0
)
{
assert
(
runner
->
dxc_compiler
);
hr
=
dxc_compiler_compile_shader
(
runner
->
dxc_compiler
,
type
,
runner
->
compile_
options
,
source
,
&
blob
);
hr
=
dxc_compiler_compile_shader
(
runner
->
dxc_compiler
,
type
,
options
,
source
,
&
blob
);
}
else
{
sprintf
(
profile
,
"%s_%s"
,
shader_type_string
(
type
),
shader_models
[
runner
->
minimum_shader_model
]);
hr
=
D3DCompile
(
source
,
strlen
(
source
),
NULL
,
NULL
,
NULL
,
"main"
,
profile
,
runner
->
compile_options
,
0
,
&
blob
,
&
errors
);
hr
=
D3DCompile
(
source
,
strlen
(
source
),
NULL
,
NULL
,
NULL
,
"main"
,
profile
,
options
,
0
,
&
blob
,
&
errors
);
}
if
(
hr
!=
S_OK
)
{
...
...
@@ -1656,6 +1663,7 @@ static void compile_shader(struct shader_runner *runner, const char *source,
size_t
len
,
enum
shader_type
type
,
enum
shader_model
model
)
{
bool
use_dxcompiler
=
(
model
>=
SHADER_MODEL_6_0
);
unsigned
int
options
=
runner
->
compile_options
;
ID3D10Blob
*
blob
=
NULL
,
*
errors
=
NULL
;
char
profile
[
7
];
HRESULT
hr
;
...
...
@@ -1686,10 +1694,17 @@ static void compile_shader(struct shader_runner *runner, const char *source,
if
(
model
<
SHADER_MODEL_5_0
&&
(
type
==
SHADER_TYPE_HS
||
type
==
SHADER_TYPE_DS
))
return
;
/* Behaviour is inconsistent between different versions of
* d3dcompiler_47.dll. Version 10.0.17134.12 seems to reject
* D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY for 5.1 profiles, while
* version 10.0.10150.0 apparently doesn't. */
if
(
model
>=
SHADER_MODEL_5_1
)
options
&=
~
D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY
;
if
(
use_dxcompiler
)
{
assert
(
runner
->
dxc_compiler
);
hr
=
dxc_compiler_compile_shader
(
runner
->
dxc_compiler
,
type
,
runner
->
compile_
options
,
source
,
&
blob
);
hr
=
dxc_compiler_compile_shader
(
runner
->
dxc_compiler
,
type
,
options
,
source
,
&
blob
);
}
else
{
...
...
@@ -1697,7 +1712,7 @@ static void compile_shader(struct shader_runner *runner, const char *source,
sprintf
(
profile
,
"%s_%s"
,
shader_type_string
(
type
),
effect_models
[
model
]);
else
sprintf
(
profile
,
"%s_%s"
,
shader_type_string
(
type
),
shader_models
[
model
]);
hr
=
D3DCompile
(
source
,
len
,
NULL
,
NULL
,
NULL
,
"main"
,
profile
,
runner
->
compile_
options
,
0
,
&
blob
,
&
errors
);
hr
=
D3DCompile
(
source
,
len
,
NULL
,
NULL
,
NULL
,
"main"
,
profile
,
options
,
0
,
&
blob
,
&
errors
);
}
hr
=
map_special_hrs
(
hr
);
todo_if
(
runner
->
hlsl_todo
[
model
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment