Refactor ShaderBuffer
This commit is contained in:
@@ -17,7 +17,7 @@ cbuffer DispatchParams
|
||||
uint pad1;
|
||||
}
|
||||
layout(set = 0, binding = 2, std430)
|
||||
RWStructuredBuffer<Frustum> out_Frustums;
|
||||
RWShaderBuffer<Frustum> out_Frustums;
|
||||
|
||||
|
||||
[numthreads(BLOCK_SIZE, BLOCK_SIZE, 1)]
|
||||
|
||||
@@ -8,7 +8,7 @@ import PrimitiveSceneData;
|
||||
import MaterialParameter;
|
||||
|
||||
layout(set = INDEX_LIGHT_ENV, binding = 4)
|
||||
StructuredBuffer<uint> lightIndexList;
|
||||
ShaderBuffer<uint> lightIndexList;
|
||||
layout(set = INDEX_LIGHT_ENV, binding = 5)
|
||||
RWTexture2D<uint2> lightGrid;
|
||||
|
||||
|
||||
@@ -21,14 +21,14 @@ layout(set = INDEX_VIEW_PARAMS, binding = 2)
|
||||
Texture2D depthTextureVS;
|
||||
|
||||
layout(set = INDEX_VIEW_PARAMS, binding = 3)
|
||||
globallycoherent RWStructuredBuffer<uint> oLightIndexCounter;
|
||||
globallycoherent RWShaderBuffer<uint> oLightIndexCounter;
|
||||
layout(set = INDEX_VIEW_PARAMS, binding = 4)
|
||||
globallycoherent RWStructuredBuffer<uint> tLightIndexCounter;
|
||||
globallycoherent RWShaderBuffer<uint> tLightIndexCounter;
|
||||
|
||||
layout(set = INDEX_VIEW_PARAMS, binding = 5)
|
||||
RWStructuredBuffer<uint> oLightIndexList;
|
||||
RWShaderBuffer<uint> oLightIndexList;
|
||||
layout(set = INDEX_VIEW_PARAMS, binding = 6)
|
||||
RWStructuredBuffer<uint> tLightIndexList;
|
||||
RWShaderBuffer<uint> tLightIndexList;
|
||||
|
||||
layout(set = INDEX_VIEW_PARAMS, binding = 7)
|
||||
RWTexture2D<uint2> oLightGrid;
|
||||
@@ -36,7 +36,7 @@ layout(set = INDEX_VIEW_PARAMS, binding = 8)
|
||||
RWTexture2D<uint2> tLightGrid;
|
||||
|
||||
layout(set = INDEX_VIEW_PARAMS, binding = 9)
|
||||
StructuredBuffer<Frustum> frustums;
|
||||
ShaderBuffer<Frustum> frustums;
|
||||
|
||||
// Debug
|
||||
//layout(set = INDEX_VIEW_PARAMS, binding = 10)
|
||||
|
||||
@@ -17,7 +17,7 @@ ConstantBuffer<ViewData> viewData;
|
||||
layout(set = 0, binding = 1)
|
||||
SamplerState glyphSampler;
|
||||
//layout(set = 1)
|
||||
//StructuredBuffer<GlyphData> glyphData;
|
||||
//ShaderBuffer<GlyphData> glyphData;
|
||||
layout(set = 1)
|
||||
Texture2D<uint> glyphTextures[];
|
||||
layout(push_constant)
|
||||
|
||||
@@ -62,10 +62,10 @@ struct PointLight : ILightEnv
|
||||
};
|
||||
|
||||
layout(set = INDEX_LIGHT_ENV, binding = 0, std430)
|
||||
StructuredBuffer<DirectionalLight> directionalLights;
|
||||
ShaderBuffer<DirectionalLight> directionalLights;
|
||||
layout(set = INDEX_LIGHT_ENV, binding = 1, std430)
|
||||
ConstantBuffer<uint> numDirectionalLights;
|
||||
layout(set = INDEX_LIGHT_ENV, binding = 2, std430)
|
||||
StructuredBuffer<PointLight> pointLights;
|
||||
ShaderBuffer<PointLight> pointLights;
|
||||
layout(set = INDEX_LIGHT_ENV, binding = 3, std430)
|
||||
ConstantBuffer<uint> numPointLights;
|
||||
|
||||
@@ -6,7 +6,7 @@ struct PrimitiveSceneData
|
||||
};
|
||||
|
||||
layout(set = INDEX_SCENE_DATA, binding = 0, std430)
|
||||
StructuredBuffer<PrimitiveSceneData> gSceneData;
|
||||
ShaderBuffer<PrimitiveSceneData> gSceneData;
|
||||
|
||||
[[vk::push_constant]]
|
||||
ConstantBuffer<uint> gSceneDataIndex;
|
||||
|
||||
Reference in New Issue
Block a user