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
c9b561e8
Commit
c9b561e8
authored
7 years ago
by
Józef Kucia
Browse files
Options
Downloads
Patches
Plain Diff
tests: Add test for div instruction.
parent
c5ba705b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/d3d12.c
+33
-0
33 additions, 0 deletions
tests/d3d12.c
with
33 additions
and
0 deletions
tests/d3d12.c
+
33
−
0
View file @
c9b561e8
...
...
@@ -5146,6 +5146,28 @@ static void test_shader_instructions(void)
unsigned int i, x, y;
ID3D12Resource *cb;
static const DWORD ps_div_code[] =
{
#if 0
float4 src0;
float4 src1;
void main(out float4 dst : SV_Target)
{
dst.x = src0.x / src1.x;
dst.yzw = (float3)0;
}
#endif
0x43425844, 0x19578813, 0xb1e4de1e, 0x3adee1dc, 0x478cd5d3, 0x00000001, 0x000000e8, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x58454853, 0x00000070, 0x00000050, 0x0000001c,
0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, 0x03000065, 0x001020f2, 0x00000000,
0x0900000e, 0x00102012, 0x00000000, 0x0020800a, 0x00000000, 0x00000000, 0x0020800a, 0x00000000,
0x00000001, 0x08000036, 0x001020e2, 0x00000000, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x0100003e,
};
static const D3D12_SHADER_BYTECODE ps_div = {ps_div_code, sizeof(ps_div_code)};
static const DWORD ps_dot2_code[] =
{
#if 0
...
...
@@ -6305,6 +6327,17 @@ static void test_shader_instructions(void)
}
tests[] =
{
{&ps_div, {{ 2.0f}, { 4.0f}}, {{ 0.5f}}},
{&ps_div, {{ 2.0f}, {-4.0f}}, {{ -0.5f}}},
{&ps_div, {{-2.0f}, { 4.0f}}, {{ -0.5f}}},
{&ps_div, {{-2.0f}, {-4.0f}}, {{ 0.5f}}},
{&ps_div, {{ 0.0f}, { 1.0f}}, {{ 0.0f}}},
{&ps_div, {{ 0.0f}, {-1.0f}}, {{ -0.0f}}},
{&ps_div, {{ 1.0f}, { 0.0f}}, {{ INFINITY}}},
{&ps_div, {{ 1.0f}, {-0.0f}}, {{-INFINITY}}},
{&ps_div, {{-1.0f}, { 0.0f}}, {{-INFINITY}}},
{&ps_div, {{-1.0f}, {-0.0f}}, {{ INFINITY}}},
{&ps_dot2, {{1.0f, 1.0f}, {1.0f, 1.0f}}, {{2.0f}}},
{&ps_dot2, {{1.0f, 1.0f}, {2.0f, 3.0f}}, {{5.0f}}},
...
...
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