Commit Graph

61 Commits

Author SHA1 Message Date
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
ad23ae81c1 internal/shader: bug fix: forbide assigning to a uniform variable
Closes #2648
2023-05-09 01:38:41 +09:00
Hajime Hoshi
2a1d23d926 internal/shader: bug fix: panic when an assignment mismatch happens
Closes #2654
2023-04-26 22:09:25 +09:00
Hajime Hoshi
f129c23393 all: update URLs in comments 2022-11-21 01:46:50 +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
f63b87f675 internal/shader: refactoring 2022-08-19 15:24:00 +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
b6a340a96f internal/shader: optimization: use a regular return for a function with one output parameter
Updates #2034
Updates #2188
2022-07-10 18:18:46 +09:00
Hajime Hoshi
8c879c7bcf internal/shader: refactoring 2022-07-10 16:02:50 +09:00
Hajime Hoshi
b2a1b9a9a2 internal/shader: bug fix: float constant didn't work with assign operators 2022-07-09 22:29:42 +09:00
Hajime Hoshi
6dcd2ff11c internal/shader: bug fix: wrong assignment rule for booleans 2022-07-08 02:19:42 +09:00
Hajime Hoshi
15fe7158fd internal/shader: implement strict type checks in assignments
Closes #1972
2022-04-09 00:02:20 +09:00
Hajime Hoshi
a617576879 internal/shaderir: replace Mul with ComponentWiseMul and MatrixMul
This is a preparation for DirectX / HLSL.

Updates #1007
2022-03-13 19:17:46 +09:00
Hajime Hoshi
880dd0682e internal/shader: bug fix: fix some failing tests 2022-03-10 02:24:29 +09:00
Hajime Hoshi
84c680c6ed internal/shader: ban the operator div on a matrix
The operator div on a matrix doesn't work on Metal.
2022-01-21 03:37:34 +09:00
Hajime Hoshi
2e5b4954f3 internal/shader: bug fix: forbid mat + float
mat + float doesn't work on Metal.
2022-01-21 02:42:22 +09:00
Hajime Hoshi
99f003a17a internal/shader: bug fix: mat *= vec is not allowed
Updates #1971
2022-01-21 02:03:50 +09:00
Hajime Hoshi
0415773b94 internal/shader: bug fix: allow the *= operator for a vector and a matrix
Updates #1971
2022-01-21 01:59:58 +09:00
Hajime Hoshi
0a537b7ad2 internal/shader: bug fix: a number literal must be represented as floats in some contexts 2022-01-17 21:14:07 +09:00
Hajime Hoshi
4940159e5b internal/shader: bug fix: operators between vec/mat and float should work
Closes #1963
2022-01-17 20:52:44 +09:00
Hajime Hoshi
d110716dc0 internal/shader: bug fix: check types correctly for assign operators
Closes #1950
2022-01-12 00:39:39 +09:00
Hajime Hoshi
83bd0772d4 internal/shader: bug fix: % should be valid only for integers
Closes #1947
2022-01-11 23:53:09 +09:00
Hajime Hoshi
374871c031 internal/shader: bug fix: a meaningless statement should raise an error (a non-call expression statement)
Updates #1898
2021-12-27 23:14:05 +09:00
Hajime Hoshi
481a2145ae internal/shader: bug fix: a meaningless statement should raise an error
Closes #1898
2021-12-27 22:05:58 +09:00
Hajime Hoshi
77b51e4707 internal/shader: Add more tests and improve the comment
Updates #1192
2021-04-09 01:25:37 +09:00
Hajime Hoshi
1cdc6ea72b internal/shader: Bug fix: Treat multiple constant definitions in one statement correctly
Updates #1192
2021-04-09 01:18:38 +09:00
Hajime Hoshi
d3fbf377ef shader: Bug fix: A wrong usage of a pointer 2020-12-20 13:32:22 +09:00
Hajime Hoshi
bf515bb594 Update version to v2.0.0-alpha 2020-10-04 04:30:40 +09:00
Hajime Hoshi
e1d8629189 shader: Bug fix: a blank identifier lhs and += cannot work 2020-09-14 00:51:27 +09:00
Hajime Hoshi
fd51abfb0d shader: Bug fix ++/-- must not be applied to a blank identifier 2020-09-14 00:32:47 +09:00
Hajime Hoshi
7666987b09 shader: Bug fix: a blank identifier cannot be used as values 2020-09-13 23:55:25 +09:00
Hajime Hoshi
154f86e6c1 shader: Check unused local variables
Fixes #1328
2020-09-13 22:36:41 +09:00
Hajime Hoshi
a5af597594 shader: Forbid assigning to special variables 2020-09-13 05:19:20 +09:00
Hajime Hoshi
8833e46c7e shader: Refactoring 2020-09-12 18:54:36 +09:00
Hajime Hoshi
a0db26f234 ebiten: Bug fix: Test failuer (TestShaderWrongReturn) 2020-09-12 18:36:22 +09:00
Hajime Hoshi
d001f49ad7 shader: Bug fix: Treat multiple-context at return correctly 2020-09-12 17:44:04 +09:00
Hajime Hoshi
2fb1033183 shader: Initialize output parameters explicitly 2020-09-12 00:35:14 +09:00
Hajime Hoshi
41d4fc288b shader: Reword 2020-09-08 01:40:49 +09:00
Hajime Hoshi
e0b8b9945f shader: Check returning value types and the number 2020-09-06 22:08:57 +09:00
Hajime Hoshi
55f0c983ba shader: Bug fix: Ignore blank identifiers for the duplication check
Fixes #1330
2020-09-03 03:03:06 +09:00
Hajime Hoshi
4ac11bf156 shader: Bug fix: Treat number literals in function calls correctly 2020-09-03 02:45:22 +09:00
Hajime Hoshi
0b1d29b6e7 shader: Bug fix: Returning value's integer literals were wrong 2020-09-03 02:10:52 +09:00
Hajime Hoshi
f5829b2cf3 shader: Check at least one variable on left side of :=
Updates #1330
2020-09-03 01:15:41 +09:00
Hajime Hoshi
8c779447db shader: Friendly error messages when local variable names are duplicated
Fixes #1254
2020-08-30 21:22:10 +09:00
Hajime Hoshi
a9b94a183b shader: Implement swapping variables
Fixes #1248
2020-08-16 18:40:45 +09:00
Hajime Hoshi
50cd33ed9b shader: Bug fix: Use integer literals in the integer context
Fixes #1299
2020-08-12 13:47:22 +09:00
Hajime Hoshi
5d2606b6a5 shader: Bug fix: Wrong local variable indices in blocks 2020-08-10 01:09:02 +09:00
Hajime Hoshi
ee9257e626 shaderir: Use pointers for Block 2020-08-09 18:00:55 +09:00