Skip to content

Commit 4c07d4a

Browse files
committed
Fix shader entry point names.
1 parent c1e3fe6 commit 4c07d4a

18 files changed

Lines changed: 23 additions & 23 deletions

MarathonRecomp/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,14 +470,14 @@ function(compile_shader FILE_PATH TARGET_NAME)
470470
if (MARATHON_RECOMP_D3D12)
471471
add_custom_command(
472472
OUTPUT ${HLSL_FILE_PATH}.dxil.h
473-
COMMAND ${DIRECTX_DXC_TOOL} -T ${TARGET_NAME} -HV 2021 -all-resources-bound -Wno-ignored-attributes -Fh ${HLSL_FILE_PATH}.dxil.h ${HLSL_FILE_PATH} -Vn g_${HLSL_NAME}_dxil
473+
COMMAND ${DIRECTX_DXC_TOOL} -T ${TARGET_NAME} -HV 2021 -all-resources-bound -Wno-ignored-attributes -E shaderMain -Fh ${HLSL_FILE_PATH}.dxil.h ${HLSL_FILE_PATH} -Vn g_${HLSL_NAME}_dxil
474474
DEPENDS ${HLSL_FILE_PATH}
475475
)
476476
target_sources(MarathonRecomp PRIVATE ${HLSL_FILE_PATH}.dxil.h)
477477
endif()
478478
add_custom_command(
479479
OUTPUT ${HLSL_FILE_PATH}.spirv.h
480-
COMMAND ${DIRECTX_DXC_TOOL} -T ${TARGET_NAME} -HV 2021 -all-resources-bound -spirv -fvk-use-dx-layout ${ARGN} -Fh ${HLSL_FILE_PATH}.spirv.h ${HLSL_FILE_PATH} -Vn g_${HLSL_NAME}_spirv
480+
COMMAND ${DIRECTX_DXC_TOOL} -T ${TARGET_NAME} -HV 2021 -all-resources-bound -spirv -fvk-use-dx-layout ${ARGN} -E shaderMain -Fh ${HLSL_FILE_PATH}.spirv.h ${HLSL_FILE_PATH} -Vn g_${HLSL_NAME}_spirv
481481
DEPENDS ${HLSL_FILE_PATH}
482482
)
483483
target_sources(MarathonRecomp PRIVATE ${HLSL_FILE_PATH}.spirv.h)

MarathonRecomp/gpu/shader/hlsl/blend_color_alpha_ps.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cbuffer SharedConstants : register(b2, space4)
2222

2323
#endif
2424

25-
float4 main(
25+
float4 shaderMain(
2626
in float4 iPos : SV_Position,
2727
in float4 iTexCoord0 : TEXCOORD0) : SV_Target0
2828
{

MarathonRecomp/gpu/shader/hlsl/copy_color_ps.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Texture2D<float4> g_Texture2DDescriptorHeap[] : register(t0, space0);
44

5-
float4 main(in float4 position : SV_Position) : SV_Target
5+
float4 shaderMain(in float4 position : SV_Position) : SV_Target
66
{
77
return g_Texture2DDescriptorHeap[g_PushConstants.ResourceDescriptorIndex].Load(int3(position.xy, 0));
88
}

MarathonRecomp/gpu/shader/hlsl/copy_depth_ps.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Texture2D<float> g_Texture2DDescriptorHeap[] : register(t0, space0);
44

5-
float main(in float4 position : SV_Position) : SV_Depth
5+
float shaderMain(in float4 position : SV_Position) : SV_Depth
66
{
77
return g_Texture2DDescriptorHeap[g_PushConstants.ResourceDescriptorIndex].Load(int3(position.xy, 0));
88
}

MarathonRecomp/gpu/shader/hlsl/copy_vs.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
void main(in uint vertexId : SV_VertexID, out float4 position : SV_Position, out float2 texCoord : TEXCOORD)
1+
void shaderMain(in uint vertexId : SV_VertexID, out float4 position : SV_Position, out float2 texCoord : TEXCOORD)
22
{
33
texCoord = float2((vertexId << 1) & 2, vertexId & 2);
44
position = float4(texCoord * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0);

MarathonRecomp/gpu/shader/hlsl/csd_filter_ps.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cbuffer SharedConstants : register(b2, space4)
1616

1717
#endif
1818

19-
float4 main(
19+
float4 shaderMain(
2020
in float4 iPosition : SV_Position,
2121
in float4 iTexCoord0 : TEXCOORD0,
2222
in float4 iTexCoord1 : TEXCOORD1) : SV_Target

MarathonRecomp/gpu/shader/hlsl/csd_no_tex_vs.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cbuffer SharedConstants : register(b2, space4)
2020

2121
#endif
2222

23-
void main(
23+
void shaderMain(
2424
[[vk::location(0)]] in float4 iPosition0 : POSITION0,
2525
[[vk::location(8)]] in float4 iColor0 : COLOR0,
2626
out float4 oPos : SV_Position,

MarathonRecomp/gpu/shader/hlsl/csd_vs.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cbuffer SharedConstants : register(b2, space4)
2020

2121
#endif
2222

23-
void main(
23+
void shaderMain(
2424
[[vk::location(0)]] in float4 iPosition0 : POSITION0,
2525
[[vk::location(8)]] in float4 iColor0 : COLOR0,
2626
[[vk::location(4)]] in float4 iTexCoord0 : TEXCOORD0,

MarathonRecomp/gpu/shader/hlsl/enhanced_motion_blur_ps.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ cbuffer SharedConstants : register(b2, space4)
3838

3939
#endif
4040

41-
float4 main(in float4 position : SV_Position, in float4 texCoord : TEXCOORD0) : SV_Target
41+
float4 shaderMain(in float4 position : SV_Position, in float4 texCoord : TEXCOORD0) : SV_Target
4242
{
4343
Texture2D<float4> sampColor = g_Texture2DDescriptorHeap[sampColor_Texture2DDescriptorIndex];
4444
Texture2D<float4> sampVelocityMap = g_Texture2DDescriptorHeap[sampVelocityMap_Texture2DDescriptorIndex];

MarathonRecomp/gpu/shader/hlsl/gamma_correction_ps.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cbuffer SharedConstants : register(b2, space4)
2020

2121
#endif
2222

23-
float4 main(in float4 position : SV_Position) : SV_Target
23+
float4 shaderMain(in float4 position : SV_Position) : SV_Target
2424
{
2525
Texture2D<float4> texture = g_Texture2DDescriptorHeap[g_TextureDescriptorIndex];
2626

0 commit comments

Comments
 (0)