[2/2] d3dcompiler: Accept dot terminated float immediate values.
Matteo Bruni
matteo.mystral at gmail.com
Thu Oct 14 08:27:34 CDT 2010
-------------- next part --------------
From b5b5e3ac0f3fb807f7c0f6ca58e5de9d1a3fe5e0 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni at codeweavers.com>
Date: Wed, 13 Oct 2010 22:27:14 +0200
Subject: d3dcompiler: Accept dot terminated float immediate values.
---
dlls/d3dcompiler_43/asmshader.l | 2 +-
dlls/d3dcompiler_43/tests/asm.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dcompiler_43/asmshader.l b/dlls/d3dcompiler_43/asmshader.l
index 0ba7e7a..5817344 100644
--- a/dlls/d3dcompiler_43/asmshader.l
+++ b/dlls/d3dcompiler_43/asmshader.l
@@ -98,7 +98,7 @@ NEWLINE (\n)|(\r\n)
COMMA ","
-IMMVAL \-?(([0-9]+)|([0-9]*\.[0-9]+))(f)?
+IMMVAL \-?(([0-9]+\.?)|([0-9]*\.[0-9]+))(f)?
ANY (.)
diff --git a/dlls/d3dcompiler_43/tests/asm.c b/dlls/d3dcompiler_43/tests/asm.c
index 08fff44..af5ad62 100644
--- a/dlls/d3dcompiler_43/tests/asm.c
+++ b/dlls/d3dcompiler_43/tests/asm.c
@@ -127,6 +127,12 @@ static void ps_1_1_test(void) {
"mov_d4 r0, r1\n",
{0xffff0101, 0x00000001, 0x8e0f0000, 0x80e40001, 0x0000ffff}
},
+ { /* shader 2 */
+ "ps.1.1\n"
+ "def c2, 0, 0., 0, 0.\n",
+ {0xffff0101, 0x00000051, 0xa00f0002, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x0000ffff}
+ },
};
exec_tests("ps_1_1", tests, sizeof(tests) / sizeof(tests[0]));
--
1.7.2.2
More information about the wine-patches
mailing list