@@ -16,41 +16,61 @@ namespace accessors
16
16
#define NBL_CONCEPT_TPLT_PRM_KINDS (typename)(typename)(typename)
17
17
#define NBL_CONCEPT_TPLT_PRM_NAMES (T)(V)(I)
18
18
#define NBL_CONCEPT_PARAM_0 (accessor, T)
19
- #define NBL_CONCEPT_PARAM_1 (index, I )
20
- #define NBL_CONCEPT_PARAM_2 (val, V )
19
+ #define NBL_CONCEPT_PARAM_1 (val, V )
20
+ #define NBL_CONCEPT_PARAM_2 (index, I )
21
21
NBL_CONCEPT_BEGIN (3 )
22
22
#define accessor NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
23
- #define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
24
- #define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
23
+ #define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
24
+ #define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
25
25
NBL_CONCEPT_END (
26
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template set<I,V >(index, val)), is_same_v, void ))
27
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<I,V >(index, val)), is_same_v, void ))
26
+ ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template set<V,I >(index, val)), is_same_v, void ))
27
+ ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<V,I >(index, val)), is_same_v, void ))
28
28
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.workgroupExecutionAndMemoryBarrier ()), is_same_v, void ))
29
29
);
30
30
#undef val
31
31
#undef index
32
32
#undef accessor
33
33
#include <nbl/builtin/hlsl/concepts/__end.hlsl>
34
34
35
- #define NBL_CONCEPT_NAME GenericDataAccessor
35
+ #define NBL_CONCEPT_NAME GenericReadAccessor
36
36
#define NBL_CONCEPT_TPLT_PRM_KINDS (typename)(typename)(typename)
37
37
#define NBL_CONCEPT_TPLT_PRM_NAMES (T)(V)(I)
38
38
#define NBL_CONCEPT_PARAM_0 (accessor, T)
39
- #define NBL_CONCEPT_PARAM_1 (index, I )
40
- #define NBL_CONCEPT_PARAM_2 (val, V )
39
+ #define NBL_CONCEPT_PARAM_1 (val, V )
40
+ #define NBL_CONCEPT_PARAM_2 (index, I )
41
41
NBL_CONCEPT_BEGIN (3 )
42
42
#define accessor NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
43
- #define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
44
- #define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
43
+ #define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
44
+ #define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
45
45
NBL_CONCEPT_END (
46
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template set<V>(index, val)), is_same_v, void ))
47
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<V>(index, val)), is_same_v, void ))
46
+ ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<V,I>(index, val)), is_same_v, void ))
48
47
);
49
48
#undef val
50
49
#undef index
51
50
#undef accessor
52
51
#include <nbl/builtin/hlsl/concepts/__end.hlsl>
53
52
53
+ #define NBL_CONCEPT_NAME GenericWriteAccessor
54
+ #define NBL_CONCEPT_TPLT_PRM_KINDS (typename)(typename)(typename)
55
+ #define NBL_CONCEPT_TPLT_PRM_NAMES (T)(V)(I)
56
+ #define NBL_CONCEPT_PARAM_0 (accessor, T)
57
+ #define NBL_CONCEPT_PARAM_1 (val, V)
58
+ #define NBL_CONCEPT_PARAM_2 (index, I)
59
+ NBL_CONCEPT_BEGIN (3 )
60
+ #define accessor NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
61
+ #define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
62
+ #define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
63
+ NBL_CONCEPT_END (
64
+ ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template set<V,I>(index, val)), is_same_v, void ))
65
+ );
66
+ #undef val
67
+ #undef index
68
+ #undef accessor
69
+ #include <nbl/builtin/hlsl/concepts/__end.hlsl>
70
+
71
+ template<typename T, typename V, typename I=uint32_t>
72
+ NBL_BOOL_CONCEPT GenericDataAccessor = GenericWriteAccessor<T,V,I> && GenericWriteAccessor<T,V,I>;
73
+
54
74
}
55
75
}
56
76
}
0 commit comments