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
1c778116
Commit
1c778116
authored
2 years ago
by
Francisco Casas
Committed by
Alexandre Julliard
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d-shader/hlsl: Remove incorrect criteria for accepting implicit casts.
parent
d93ce289
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!35
vkd3d-shader/hlsl: Support complex implicit casts, complex explicit casts and complex broadcasts. (PART 2/3 v2)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libs/vkd3d-shader/hlsl.y
+0
-16
0 additions, 16 deletions
libs/vkd3d-shader/hlsl.y
tests/cast-componentwise-equal.shader_test
+5
-5
5 additions, 5 deletions
tests/cast-componentwise-equal.shader_test
with
5 additions
and
21 deletions
libs/vkd3d-shader/hlsl.y
+
0
−
16
View file @
1c778116
...
...
@@ -222,22 +222,6 @@ static bool implicit_compatible_data_types(struct hlsl_type *src, struct hlsl_ty
return true;
}
if (src->type == HLSL_CLASS_ARRAY && dst->type == HLSL_CLASS_ARRAY)
{
return hlsl_type_component_count(src) == hlsl_type_component_count(dst);
}
if ((src->type == HLSL_CLASS_ARRAY && dst->type <= HLSL_CLASS_LAST_NUMERIC)
|| (src->type <= HLSL_CLASS_LAST_NUMERIC && dst->type == HLSL_CLASS_ARRAY))
{
/* e.g. float4[3] to float4 is allowed */
if (src->type == HLSL_CLASS_ARRAY && hlsl_types_are_equal(src->e.array.type, dst))
return true;
if (hlsl_type_component_count(src) == hlsl_type_component_count(dst))
return true;
return false;
}
if (src->type <= HLSL_CLASS_VECTOR && dst->type <= HLSL_CLASS_VECTOR)
{
if (src->dimx >= dst->dimx)
...
...
This diff is collapsed.
Click to expand it.
tests/cast-componentwise-equal.shader_test
+
5
−
5
View file @
1c778116
...
...
@@ -226,7 +226,7 @@ float4 main() : sv_target
}
[pixel shader fail
todo
]
[pixel shader fail]
float main() : SV_TARGET
{
float arr[3] = {1, 2, 3};
...
...
@@ -237,7 +237,7 @@ float main() : SV_TARGET
}
[pixel shader fail
todo
]
[pixel shader fail]
float main() : SV_TARGET
{
float2 arr[3] = {1, 2, 3, 4, 5, 6};
...
...
@@ -248,7 +248,7 @@ float main() : SV_TARGET
}
[pixel shader fail
todo
]
[pixel shader fail]
float4 main() : SV_TARGET
{
int arr1[4] = {1, 2, 3, 4};
...
...
@@ -270,7 +270,7 @@ float4 main() : SV_TARGET
}
[pixel shader fail
todo
]
[pixel shader fail]
float4 main() : SV_TARGET
{
float4 f = {1, 2, 3, 4};
...
...
@@ -281,7 +281,7 @@ float4 main() : SV_TARGET
}
[pixel shader fail
todo
]
[pixel shader fail]
float4 main() : SV_TARGET
{
float arr[4] = {1, 2, 3, 4};
...
...
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