aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_intrinsics.py
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-05-31 13:44:40 -0400
committerJonathan Marek <[email protected]>2019-05-31 21:35:26 +0000
commitc12750527b7c4d1f4265ffa2346fd5c2346f41cd (patch)
tree60fc673c13ab4fc85a1f057d1b72f871c6a2043a /src/compiler/nir/nir_intrinsics.py
parent6016df211fdd6f1846255ea55d272e1f36881357 (diff)
nir: add type information to load uniform/input and store output intrinsics
This type information will be used by gather_ssa_types to get usable results Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_intrinsics.py')
-rw-r--r--src/compiler/nir/nir_intrinsics.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py
index df459a3cdec..0ae33a17fe0 100644
--- a/src/compiler/nir/nir_intrinsics.py
+++ b/src/compiler/nir/nir_intrinsics.py
@@ -118,6 +118,8 @@ ALIGN_MUL = "NIR_INTRINSIC_ALIGN_MUL"
ALIGN_OFFSET = "NIR_INTRINSIC_ALIGN_OFFSET"
# The vulkan descriptor type for vulkan_resource_index
DESC_TYPE = "NIR_INTRINSIC_DESC_TYPE"
+# The nir_alu_type of a uniform/input/output
+TYPE = "NIR_INTRINSIC_TYPE"
#
# Possible flags:
@@ -640,11 +642,11 @@ def load(name, num_srcs, indices=[], flags=[]):
flags=flags)
# src[] = { offset }.
-load("uniform", 1, [BASE, RANGE], [CAN_ELIMINATE, CAN_REORDER])
+load("uniform", 1, [BASE, RANGE, TYPE], [CAN_ELIMINATE, CAN_REORDER])
# src[] = { buffer_index, offset }.
load("ubo", 2, [ACCESS, ALIGN_MUL, ALIGN_OFFSET], flags=[CAN_ELIMINATE, CAN_REORDER])
# src[] = { offset }.
-load("input", 1, [BASE, COMPONENT], [CAN_ELIMINATE, CAN_REORDER])
+load("input", 1, [BASE, COMPONENT, TYPE], [CAN_ELIMINATE, CAN_REORDER])
# src[] = { vertex, offset }.
load("per_vertex_input", 2, [BASE, COMPONENT], [CAN_ELIMINATE, CAN_REORDER])
# src[] = { barycoord, offset }.
@@ -679,7 +681,7 @@ def store(name, num_srcs, indices=[], flags=[]):
intrinsic("store_" + name, [0] + ([1] * (num_srcs - 1)), indices=indices, flags=flags)
# src[] = { value, offset }.
-store("output", 2, [BASE, WRMASK, COMPONENT])
+store("output", 2, [BASE, WRMASK, COMPONENT, TYPE])
# src[] = { value, vertex, offset }.
store("per_vertex_output", 3, [BASE, WRMASK, COMPONENT])
# src[] = { value, block_index, offset }