浏览代码

Refactor API validation code to actually check that each define is

indeed define, this prevents platforms from going out of sync.
/main
Joachim Ante 8 年前
当前提交
32b23b9d
共有 4 个文件被更改,包括 12 次插入12 次删除
  1. 7
      Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11.hlsl
  2. 7
      Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11_1.hlsl
  3. 2
      Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl
  4. 8
      Assets/ScriptableRenderLoop/ShaderLibrary/API/Validate.hlsl

7
Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11.hlsl


#ifndef UNITY_D3D11_INCLUDED
#define UNITY_D3D11_INCLUDED
#define UNITY_UV_STARTS_AT_TOP 1
#endif // UNITY_D3D11_INCLUDED
#define UNITY_UV_STARTS_AT_TOP 1

7
Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11_1.hlsl


#ifndef UNITY_D3D11_INCLUDED
#define UNITY_D3D11_INCLUDED
#define UNITY_UV_STARTS_AT_TOP 1
#endif // UNITY_D3D11_INCLUDED
#define UNITY_UV_STARTS_AT_TOP 1

2
Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl


#include "API/D3D11.hlsl"
#elif defined(SHADER_API_XBOXONE)
#include "API/D3D11_1.hlsl"
#else
unsupported shader api
#endif
// ----------------------------------------------------------------------------

8
Assets/ScriptableRenderLoop/ShaderLibrary/API/Validate.hlsl


// Upgrade NOTE: replaced 'defined in' with 'defined (in)'
#define REQUIRE_DEFINED(X_) \
#ifndef X_ \
#error X_ must be defined (in) the platform include \
#endif X_ \
REQUIRE_DEFINED(UNITY_UV_STARTS_AT_TOP)
正在加载...
取消
保存