|
@@ -8,6 +8,8 @@ float4 FetchFromIndexMap( uniform Texture2D Tex, uniform SamplerState SS, const
|
|
return Sample * 255.0f;
|
|
return Sample * 255.0f;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+struct S { float f; };
|
|
|
|
+
|
|
RWByteAddressBuffer uav1 : register(u3);
|
|
RWByteAddressBuffer uav1 : register(u3);
|
|
float4 RWByteAddressBufferMain(uint2 a : A, uint2 b : B) : SV_Target
|
|
float4 RWByteAddressBufferMain(uint2 a : A, uint2 b : B) : SV_Target
|
|
{
|
|
{
|
|
@@ -31,6 +33,9 @@ float4 RWByteAddressBufferMain(uint2 a : A, uint2 b : B) : SV_Target
|
|
r += uav1.Load<int32_t3>(20).xyzx;
|
|
r += uav1.Load<int32_t3>(20).xyzx;
|
|
r += uav1.Load<float16_t>(20);
|
|
r += uav1.Load<float16_t>(20);
|
|
r += uav1.Load<float32_t1>(20);
|
|
r += uav1.Load<float32_t1>(20);
|
|
|
|
+ r += (float4)uav1.Load<float2x2>(20);
|
|
|
|
+ r += (float4)uav1.Load<float[4]>(20);
|
|
|
|
+ r += uav1.Load<S>(20).f.xxxx;
|
|
|
|
|
|
r += uav1.Load<half4>(4, status);
|
|
r += uav1.Load<half4>(4, status);
|
|
r += uav1.Load<float4>(12, status);
|
|
r += uav1.Load<float4>(12, status);
|
|
@@ -38,20 +43,24 @@ float4 RWByteAddressBufferMain(uint2 a : A, uint2 b : B) : SV_Target
|
|
r += uav1.Load<int32_t3>(20, status).xyzx;
|
|
r += uav1.Load<int32_t3>(20, status).xyzx;
|
|
r += uav1.Load<float16_t>(20, status);
|
|
r += uav1.Load<float16_t>(20, status);
|
|
r += uav1.Load<float32_t1>(20, status);
|
|
r += uav1.Load<float32_t1>(20, status);
|
|
|
|
+ r += (float4)uav1.Load<float2x2>(20, status);
|
|
|
|
+ r += (float4)uav1.Load<float[4]>(20, status);
|
|
|
|
+ r += uav1.Load<S>(20, status).f.xxxx;
|
|
|
|
|
|
// errors
|
|
// errors
|
|
- r += uav1.Load<float, float3>(16); /* expected-error {{Explicit template arguments on intrinsic Load are limited one to scalar or vector type.}} */
|
|
|
|
|
|
+ r += uav1.Load<float, float3>(16); /* expected-error {{Explicit template arguments on intrinsic Load must be a single numeric type}} */
|
|
r += uav1.Load<double3>(16); /* expected-error {{cannot convert from 'double3' to 'float4'}} */
|
|
r += uav1.Load<double3>(16); /* expected-error {{cannot convert from 'double3' to 'float4'}} */
|
|
- r += uav1.Load2<float>(16); /* expected-error {{Explicit template arguments on intrinsic Load2 are not supported.}} */
|
|
|
|
- r += uav1.Load3<int>(20); /* expected-error {{Explicit template arguments on intrinsic Load3 are not supported.}} */
|
|
|
|
- r += uav1.Load4<int16_t>(24); /* expected-error {{Explicit template arguments on intrinsic Load4 are not supported.}} */
|
|
|
|
- r += uav1.Load<half3x4>(24); /* expected-error {{Explicit template arguments on intrinsic Load are limited one to scalar or vector type.}} expected-error {{cannot convert from 'matrix<half, 3, 4>' to 'float4'}} */
|
|
|
|
- r += uav1.Load<float, float3>(16, status); /* expected-error {{Explicit template arguments on intrinsic Load are limited one to scalar or vector type.}} */
|
|
|
|
|
|
+ r += uav1.Load2<float>(16); /* expected-error {{Explicit template arguments on intrinsic Load2 are not supported}} */
|
|
|
|
+ r += uav1.Load3<int>(20); /* expected-error {{Explicit template arguments on intrinsic Load3 are not supported}} */
|
|
|
|
+ r += uav1.Load4<int16_t>(24); /* expected-error {{Explicit template arguments on intrinsic Load4 are not supported}} */
|
|
|
|
+ r += uav1.Load<half3x4>(24); /* expected-error {{cannot convert from 'half3x4' to 'float4'}} */
|
|
|
|
+ r += uav1.Load<float, float3>(16, status); /* expected-error {{Explicit template arguments on intrinsic Load must be a single numeric type}} */
|
|
r += uav1.Load<double3>(16, status); /* expected-error {{cannot convert from 'double3' to 'float4'}} */
|
|
r += uav1.Load<double3>(16, status); /* expected-error {{cannot convert from 'double3' to 'float4'}} */
|
|
- r += uav1.Load2<float>(16, status); /* expected-error {{Explicit template arguments on intrinsic Load2 are not supported.}} */
|
|
|
|
- r += uav1.Load3<int>(20, status); /* expected-error {{Explicit template arguments on intrinsic Load3 are not supported.}} */
|
|
|
|
- r += uav1.Load4<int16_t>(24, status); /* expected-error {{Explicit template arguments on intrinsic Load4 are not supported.}} */
|
|
|
|
- r += uav1.Load<half3x4>(24, status); /* expected-error {{Explicit template arguments on intrinsic Load are limited one to scalar or vector type.}} expected-error {{cannot convert from 'matrix<half, 3, 4>' to 'float4'}} */
|
|
|
|
|
|
+ r += uav1.Load2<float>(16, status); /* expected-error {{Explicit template arguments on intrinsic Load2 are not supported}} */
|
|
|
|
+ r += uav1.Load3<int>(20, status); /* expected-error {{Explicit template arguments on intrinsic Load3 are not supported}} */
|
|
|
|
+ r += uav1.Load4<int16_t>(24, status); /* expected-error {{Explicit template arguments on intrinsic Load4 are not supported}} */
|
|
|
|
+ r += uav1.Load<half3x4>(24, status); /* expected-error {{cannot convert from 'half3x4' to 'float4'}} */
|
|
|
|
+
|
|
// valid template argument
|
|
// valid template argument
|
|
uav1.Store(0, r);
|
|
uav1.Store(0, r);
|
|
uav1.Store(0, r.x);
|
|
uav1.Store(0, r.x);
|
|
@@ -62,11 +71,11 @@ float4 RWByteAddressBufferMain(uint2 a : A, uint2 b : B) : SV_Target
|
|
struct MyStruct {
|
|
struct MyStruct {
|
|
float4 x;
|
|
float4 x;
|
|
};
|
|
};
|
|
- uav1.Store<float>(0, r); /* expected-error {{Explicit template arguments on intrinsic Store are not supported.}} */
|
|
|
|
- uav1.Store<int64_t4>(0, r); /* expected-error {{Explicit template arguments on intrinsic Store are not supported.}} */
|
|
|
|
- uav1.Store2<float>(0, r.xy); /* expected-error {{Explicit template arguments on intrinsic Store2 are not supported.}} */
|
|
|
|
- uav1.Store3<float>(0, r.xyz); /* expected-error {{Explicit template arguments on intrinsic Store3 are not supported.}} */
|
|
|
|
- uav1.Store4<float>(0, r); /* expected-error {{Explicit template arguments on intrinsic Store4 are not supported.}} */
|
|
|
|
|
|
+ uav1.Store<float>(0, r); /* expected-error {{Explicit template arguments on intrinsic Store are not supported}} */
|
|
|
|
+ uav1.Store<int64_t4>(0, r); /* expected-error {{Explicit template arguments on intrinsic Store are not supported}} */
|
|
|
|
+ uav1.Store2<float>(0, r.xy); /* expected-error {{Explicit template arguments on intrinsic Store2 are not supported}} */
|
|
|
|
+ uav1.Store3<float>(0, r.xyz); /* expected-error {{Explicit template arguments on intrinsic Store3 are not supported}} */
|
|
|
|
+ uav1.Store4<float>(0, r); /* expected-error {{Explicit template arguments on intrinsic Store4 are not supported}} */
|
|
uav1.Store(0, float2x4(1,2,3,4,5,6,7,8)); /* expected-error {{no matching member function for call to 'Store'}} */
|
|
uav1.Store(0, float2x4(1,2,3,4,5,6,7,8)); /* expected-error {{no matching member function for call to 'Store'}} */
|
|
uav1.Store<float3x2>(0, float3x2(1,2,3,4,5,6)); /* expected-error {{no matching member function for call to 'Store'}} */
|
|
uav1.Store<float3x2>(0, float3x2(1,2,3,4,5,6)); /* expected-error {{no matching member function for call to 'Store'}} */
|
|
uav1.Store(0, (double3)r.xyz);
|
|
uav1.Store(0, (double3)r.xyz);
|