[Present]
run = CustomShaderDebugCB

[ResourceDebugCB]
; No known way to allow stereo constant buffers (besides the driver's internal
; stereo constant buffer).
[ResourceDebugBuf]
; Forcing the driver surface creation mode to stereo doesn't work for buffers
; (conversely, forcing it to mono does work), but if stereo compute shaders is
; enabled then overriding the bind flags to include UAVs will do the trick (RTV
; might work for a regular buffer?):
mode = stereo
bind_flags = unordered_access shader_resource
[ResourceDebugBufUint]
mode = stereo
bind_flags = unordered_access shader_resource
[ResourceDebugBufRaw]
;type = ByteAddressBuffer
mode = stereo
bind_flags = unordered_access shader_resource
[ResourceDebugCBFont]
; Note that this font has the size of each character embedded in the unused
; space of the final character, which the geometry shader uses to render each
; character the correct width. This font was generated with gen_bm_font.py,
; then converted to DDS (because our PNG loading seems to be broken o_O):
filename = ShaderFixes\LiberationSans-Bold.dds
[CustomShaderDebugCB]
; The vertex shader passes constant buffer indexes to the geometry shader:
vs = ShaderFixes/debug_cb.hlsl
hs = null
ds = null
; The geometry shader generates the text for a given constant buffer index:
gs = ShaderFixes/debug_cb.hlsl
; The pixel shader draws the font:
ps = ShaderFixes/debug_cb.hlsl
; Disable compiler optimisations to save 1.5 seconds every F10. The shader
; becomes significantly larger and potentially slower, but that doesn't matter
; since it is a debugging shader:
flags = skip_optimization
; Allows us to use SV_Position.z to pack a texcoord, increasing the character
; limit per geometry shader invocation:
depth_clip_enable = false
cull = none
; Enable alpha blending. To change the text colour, edit the pixel shader:
blend = add one inv_src_alpha
; Use points as the primitive from the vertex shader to the geometry shader:
topology = point_list
run = BuiltInCommandListUnbindAllRenderTargets
o0 = set_viewport no_view_cache bb
; Pass the constant buffer to view into the geometry shader:
gs-cb13 = ResourceDebugCB
gs-t113 = ResourceDebugBuf
gs-t114 = ResourceDebugBufUint
; raw forces raw access in cases where the buffer supports either way:
gs-t115 = raw ResourceDebugBufRaw
; x is used by the shader to check if anything is bound to the cb13 slot (t113
; is checked with GetDimensions):
local $bak_x = x
x = gs-cb13
; Font is passed into the pixel shader (to draw it) *and* the geometry shader
; (as the character sizes are encoded in the final character of the font):
gs-t100 = ResourceDebugCBFont
ps-t100 = ResourceDebugCBFont
; Change this number to set how many entries are drawn:
draw = 4096, 0
; I didn't back these up because I doubt they will be in use and this shader
; won't be enabled in production, but it's still good practice to clear them:
post gs-cb13 = null
post gs-t113 = null
post gs-t114 = null
post gs-t115 = null
post gs-t100 = null
post ps-t100 = null
post x = $bak_x