Commit Graph

96 Commits

Author SHA1 Message Date
Hajime Hoshi
e225f118fb internal/shaderir: use ConstType just for an assetion
Updates #2550
2023-07-29 14:02:26 +09:00
Hajime Hoshi
692d119818 internal/shader: refactoring: reduce ConstType usages
Updates #2550
2023-07-28 01:36:15 +09:00
Hajime Hoshi
88be4c5b7c internal/shader: reland: bug fix: stricter type checks for the built-in cast-like functions
Closes #2712
2023-07-28 01:33:27 +09:00
Hajime Hoshi
be2123f7fd Revert "internal/shader: bug fix: stricter type checks for the built-in functions"
This reverts commit 287545b02a.

Reason: test failures

Updates #2712
2023-07-28 00:54:36 +09:00
Hajime Hoshi
287545b02a internal/shader: bug fix: stricter type checks for the built-in functions
Closes #2712
2023-07-28 00:51:42 +09:00
Hajime Hoshi
ef08873f30 internal/shader: reland2: bug fix: int + ivec failed
Closes #2707
2023-07-26 01:23:02 +09:00
Hajime Hoshi
8aefa49510 Revert "internal/shader: reland: bug fix: int + ivec failed"
This reverts commit 1c4a0ac0dc.

Reason: TestShaderUniformMatrix2 failed on Windows

Updates #2707
2023-07-26 00:30:17 +09:00
Hajime Hoshi
1c4a0ac0dc internal/shader: reland: bug fix: int + ivec failed
Closes #2707
2023-07-25 23:02:06 +09:00
Hajime Hoshi
3d8d759976 Revert "internal/shader: bug fix: int + ivec failed"
This reverts commit a93908503a.

Reason: test failures at TestShaderUniformMatrix2

Updates #2070
2023-07-25 22:53:02 +09:00
Hajime Hoshi
a93908503a internal/shader: bug fix: int + ivec failed
Closes #2707
2023-07-25 22:42:06 +09:00
Hajime Hoshi
ad63d0842c internal/shader: refactoring: check dimensions at AreValidTypesForBinaryOp 2023-07-25 13:46:44 +09:00
Hajime Hoshi
6b94de4ef6 internal/shader: refactoring: integrate type checks to shaderir.AreValidTypesForBinaryOp 2023-07-25 02:51:25 +09:00
Hajime Hoshi
29545906c0 internal/shader: refactoring 2023-07-25 01:40:47 +09:00
Hajime Hoshi
c329eab1b2 internal/shader: refactoring 2023-07-24 12:29:27 +09:00
Hajime Hoshi
20123e8420 internal/shader: bug fix: unary operators should keep the type info
Closes #2705
2023-07-24 02:21:42 +09:00
Hajime Hoshi
5a1109e56a internal/shader: refactoring 2023-07-24 02:06:54 +09:00
Hajime Hoshi
d99da81203 internal/shader: refactoring 2023-07-24 01:49:37 +09:00
Hajime Hoshi
a8c3eb7167 internal/shader: bug fix: don't allow a binary op with different typed constants
Closes #2704
2023-07-24 01:41:22 +09:00
Hajime Hoshi
9ffbc51607 internal/shader: remove ConstType usages from canApplyBinaryOp
Updates #2550
2023-07-23 14:55:15 +09:00
Hajime Hoshi
12e60b7273 internal/shader: reduce shaderir.ConstType usages
Updates #2550
2023-07-23 13:08:08 +09:00
Hajime Hoshi
a5af8f3b0b internal/shaderir: remove isUntypedInteger
Updates #2550
2023-07-23 13:04:25 +09:00
guangwu
54e1263565
all: unnecessary use of fmt.Sprintf (#2691)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-07-05 16:36:29 +09:00
Hajime Hoshi
9d2178cf71 internal/shaderir: rename the built-in func to get a texel to __texelAt 2023-04-23 22:57:30 +09:00
Hajime Hoshi
b5ca404c42 internal/shader: bug fix: a swizzling 'r' didn't work for vec2
Closes #2652
2023-04-23 21:29:20 +09:00
Hajime Hoshi
ad7d5a86f9 internal/shader: bug fix: check the type for composite literal
Closes #2348
2023-02-20 23:07:11 +09:00
Hajime Hoshi
e9e5d27d2c internal/shader: bug fix: % operators for integer vecs didn't work
Closes #1911
2022-11-21 01:39:20 +09:00
Hajime Hoshi
0b9cbaa1ed internal/shader: introduce integer vectors (ivec2, ivec3, ivec4)
Closes #1911
2022-11-21 00:31:23 +09:00
Hajime Hoshi
dc1df824a5 internal/shader: more strict type checks with built-in functions 2022-11-20 17:47:53 +09:00
Hajime Hoshi
5d8216def3 internal/shader: stricter const type check 2022-11-20 15:52:33 +09:00
Hajime Hoshi
5f4e3a0348 internal/shader: add swizzling check 2022-11-19 22:39:17 +09:00
Hajime Hoshi
4ade34bc02 internal/shaderir: bug fix: wrong argument check on pow
Closes #2304
2022-09-05 02:35:48 +09:00
Hajime Hoshi
85d54515cd internal/shader: check types for && and || correctly
Updates #2256
2022-08-19 17:34:03 +09:00
Hajime Hoshi
d6047f3988 internal/shader: add type checks to compare two values
Closes #2187
2022-08-19 17:03:29 +09:00
Hajime Hoshi
f63b87f675 internal/shader: refactoring 2022-08-19 15:24:00 +09:00
Hajime Hoshi
590147acda internal/shader: add type checks for the builtin function texture2D
Note that texture2D is usually not called by users.

Closes #2184
2022-08-19 02:27:40 +09:00
Hajime Hoshi
63eee0600e internal/shader: add type checks for the builtin function transpose
Updates #2184
2022-08-19 01:57:24 +09:00
Hajime Hoshi
7a94cbbd62 internal/shader: add refract
Closes #2255
2022-08-19 01:48:35 +09:00
Hajime Hoshi
13ae8f5872 internal/shader: add type checks for the builtin function faceforward
Updates #2184
2022-08-19 01:48:30 +09:00
Hajime Hoshi
73f12fa704 internal/shader: add type checks for the builtin function smoothstep
Updates #2184
2022-08-19 01:27:01 +09:00
Hajime Hoshi
f3ea274d20 internal/shader: add type checks for the builtin function mix
Updates #2184
2022-08-19 01:19:20 +09:00
Hajime Hoshi
ec851a85f5 internal/shader: add type checks for the builtin function step
Updates #2184
2022-08-19 00:25:04 +09:00
Hajime Hoshi
34cc6405dd internal/shader: add type checks for the builtin function clamp
Updates #2184
2022-08-19 00:14:38 +09:00
Hajime Hoshi
82a9aac689 internal/shader: add type checks for the builtin function cross
Updates #2184
2022-08-18 23:45:01 +09:00
Hajime Hoshi
7af6c99954 internal/shader: add type checks for some builtin functions
Updates #2184
2022-08-18 23:21:25 +09:00
Hajime Hoshi
fb775d806c internal/shader: disallow 'discard' in other functions than the fragment entry point
Closes #2248
2022-08-17 23:39:52 +09:00
Hajime Hoshi
205245b094 internal/shader: implement a new built-in function discard
Closes #1969
2022-08-09 11:31:59 +09:00
mattn
2bacecca24
fix typos (#2227) 2022-08-03 22:40:39 +09:00
Hajime Hoshi
dce34d2306 internal/shader: change the naming convention: Num -> Count 2022-07-13 02:02:48 +09:00
Hajime Hoshi
4afabe34ae internal/shader: optimization: remove unnecessary local variables
Updates #2034
Updates #2188
2022-07-10 19:01:58 +09:00
Hajime Hoshi
c01821ca5c internal/shader: use all functions for vector comparisons
Updates #2186
2022-07-09 02:30:16 +09:00