A bunch of array fixes and some buffer stuff that doesn't quite work yet

This commit is contained in:
2025-09-24 14:04:50 +02:00
parent 50a404984d
commit 940b58331d
18 changed files with 261 additions and 137 deletions

11
test/buffers.ink Normal file
View File

@@ -0,0 +1,11 @@
property_buffer :: buffer {
color : float4;
}
cbuffer :: constant_buffer {
color : float4;
}
pixel main :: (index : int) {
return property_buffer[index].color;
}

View File

@@ -1,4 +1,4 @@
scope (global) [
[Foo] : {}
[Foo] : {}
scope (Foo) []
]

View File

@@ -1,7 +1,10 @@
scope (global) [
[vertex__vs_main] : ()
scope (vertex__vs_main) [
[i] : int
[x] : int
scope (block) [
[i] : int
scope (block) []
]
]
]

View File

@@ -1,7 +1,8 @@
scope (global) [
[pixel__ps_main] : ()
scope (pixel__ps_main) [
[alpha_color] : float4
[f] : float
scope (pixel__ps_main) [ scope (block) [
[alpha_color] : float4
[f] : float
]
]
]

View File

@@ -2,5 +2,8 @@ scope (global) [
[vertex__vs_main] : (pos : float3) -> float4
scope (vertex__vs_main) [
[pos] : float3
scope (block) [ scope (block) []
scope (block) []
]
]
]

View File

@@ -1,7 +1,7 @@
scope (global) [
[foo] : (f : Foo) -> float
[vertex__vs_main] : ()
[Foo] : {some_data : float}
[Foo] : {some_data : float}
scope (Foo) [
[some_data] : float
]

View File

@@ -2,5 +2,8 @@ scope (global) [
[vertex__vs_main] : (pos : float3) -> float4
scope (vertex__vs_main) [
[pos] : float3
scope (block) []
scope (block) []
scope (block) []
]
]

View File

@@ -2,5 +2,6 @@ scope (global) [
[vertex__vs_main] : (pos : float3) -> float4
scope (vertex__vs_main) [
[pos] : float3
scope (block) []
]
]

View File

@@ -2,5 +2,7 @@ scope (global) [
[vertex__vs_main] : (pos : float3) -> float4
scope (vertex__vs_main) [
[pos] : float3
scope (block) []
scope (block) []
]
]

View File

@@ -1,5 +1,5 @@
scope (global) [
[Data] : {color : float4}
[Data] : {color : float4}
[vertex__vs_main] : ()
scope (Data) [
[color] : float4

View File

@@ -1,7 +1,7 @@
scope (global) [
[Bar] : {t : Foo}
[Bar] : {t : Foo}
[vertex__vs_main] : ()
[Foo] : {color : float4}
[Foo] : {color : float4}
scope (Foo) [
[color] : float4
]

View File

@@ -0,0 +1,6 @@
float4 vs_main() : SV_POSITION
{
float4 arr[16];
return arr[0];
}