https://github.com/shader-slang/slang
Raw File
Tip revision: 60bcc6809f57e12f3705cc65cb325b0983b08899 authored by Tim Foley on 02 May 2018, 18:40:09 UTC
Add support for explicit register space bindings (#542)
Tip revision: 60bcc68
cast-precedence.hlsl
//TEST:COMPARE_HLSL: -profile vs_5_0

// Confirm that type-cast expressions parse with
// the appropriate precedence.

#ifndef __SLANG__
#define C _SV022SLANG_parameterGroup_C
#define a _SV022SLANG_ParameterGroup_C1a
#define b _SV022SLANG_ParameterGroup_C1b
#define SV_Position SV_POSITION
#endif

cbuffer C : register(b0)
{
	float a;
	float b;
};

float4 main() : SV_Position
{
	return (uint) a / b;
}
back to top