diff options
author | Peter Harris <pharris@opentext.com> | 2014-03-10 13:03:51 -0400 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2014-03-10 13:03:51 -0400 |
commit | a8d6bbf19a3e6c57c8b902cbd994bafe63591078 (patch) | |
tree | 6547c2fa2e10ca840e6df30348e4a8077cfc336f | |
parent | c404049a52f7999d716bc0e2cf6c7af30c62f50f (diff) |
So they can be studied without needing to run the generator.
344 files changed, 17605 insertions, 0 deletions
diff --git a/and_copyplane_fullmask_clipmask.hlps b/and_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..04aad24 --- /dev/null +++ b/and_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* and shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_copyplane_fullmask_unclipped.hlps b/and_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..ec29783 --- /dev/null +++ b/and_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* and shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_copyplane_planemask_clipmask.hlps b/and_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..47c1af3 --- /dev/null +++ b/and_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* and shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_copyplane_planemask_unclipped.hlps b/and_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..3fd60ca --- /dev/null +++ b/and_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* and shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_opaquestip_fullmask_clipmask.hlps b/and_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..204c19a --- /dev/null +++ b/and_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* and shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_opaquestip_fullmask_unclipped.hlps b/and_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..74a6c09 --- /dev/null +++ b/and_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* and shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_opaquestip_planemask_clipmask.hlps b/and_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..63eb91e --- /dev/null +++ b/and_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* and shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_opaquestip_planemask_unclipped.hlps b/and_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..8ecaf66 --- /dev/null +++ b/and_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* and shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_solid_fullmask_clipmask.hlps b/and_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..5f0ba90 --- /dev/null +++ b/and_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* and shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_solid_fullmask_unclipped.hlps b/and_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..a13cfe6 --- /dev/null +++ b/and_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* and shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_solid_planemask_clipmask.hlps b/and_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..051de92 --- /dev/null +++ b/and_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* and shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_solid_planemask_unclipped.hlps b/and_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..f59f397 --- /dev/null +++ b/and_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* and shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_stipple_fullmask_clipmask.hlps b/and_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..ea59102 --- /dev/null +++ b/and_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* and shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_stipple_fullmask_unclipped.hlps b/and_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..586921c --- /dev/null +++ b/and_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* and shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_stipple_planemask_clipmask.hlps b/and_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..0a66bf8 --- /dev/null +++ b/and_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* and shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_stipple_planemask_unclipped.hlps b/and_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..42fd4ef --- /dev/null +++ b/and_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* and shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_tile_fullmask_clipmask.hlps b/and_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..119404e --- /dev/null +++ b/and_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* and shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_tile_fullmask_unclipped.hlps b/and_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..4d89dee --- /dev/null +++ b/and_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* and shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + return color; +} diff --git a/and_tile_planemask_clipmask.hlps b/and_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..4d1e501 --- /dev/null +++ b/and_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* and shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/and_tile_planemask_unclipped.hlps b/and_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..92c18bb --- /dev/null +++ b/and_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* and shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_copyplane_fullmask_clipmask.hlps b/andinverted_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..ce9ae0d --- /dev/null +++ b/andinverted_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_copyplane_fullmask_unclipped.hlps b/andinverted_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..f8c60dc --- /dev/null +++ b/andinverted_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_copyplane_planemask_clipmask.hlps b/andinverted_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..3dc4656 --- /dev/null +++ b/andinverted_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_copyplane_planemask_unclipped.hlps b/andinverted_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..b89eb59 --- /dev/null +++ b/andinverted_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_opaquestip_fullmask_clipmask.hlps b/andinverted_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..c179881 --- /dev/null +++ b/andinverted_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_opaquestip_fullmask_unclipped.hlps b/andinverted_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..1f13aff --- /dev/null +++ b/andinverted_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_opaquestip_planemask_clipmask.hlps b/andinverted_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..78815b2 --- /dev/null +++ b/andinverted_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_opaquestip_planemask_unclipped.hlps b/andinverted_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..5d5dc61 --- /dev/null +++ b/andinverted_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_solid_fullmask_clipmask.hlps b/andinverted_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..ea103fe --- /dev/null +++ b/andinverted_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_solid_fullmask_unclipped.hlps b/andinverted_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..0da18ae --- /dev/null +++ b/andinverted_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_solid_planemask_clipmask.hlps b/andinverted_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..8e6a645 --- /dev/null +++ b/andinverted_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_solid_planemask_unclipped.hlps b/andinverted_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..5367998 --- /dev/null +++ b/andinverted_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_stipple_fullmask_clipmask.hlps b/andinverted_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..0e37ba2 --- /dev/null +++ b/andinverted_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_stipple_fullmask_unclipped.hlps b/andinverted_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..57afa70 --- /dev/null +++ b/andinverted_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_stipple_planemask_clipmask.hlps b/andinverted_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..cf2d12a --- /dev/null +++ b/andinverted_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_stipple_planemask_unclipped.hlps b/andinverted_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..162161a --- /dev/null +++ b/andinverted_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_tile_fullmask_clipmask.hlps b/andinverted_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..a2ef494 --- /dev/null +++ b/andinverted_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_tile_fullmask_unclipped.hlps b/andinverted_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..ef713a2 --- /dev/null +++ b/andinverted_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + return color; +} diff --git a/andinverted_tile_planemask_clipmask.hlps b/andinverted_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..b5bed3a --- /dev/null +++ b/andinverted_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andinverted_tile_planemask_unclipped.hlps b/andinverted_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..df37de0 --- /dev/null +++ b/andinverted_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* andinverted shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_copyplane_fullmask_clipmask.hlps b/andreverse_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..f3e617f --- /dev/null +++ b/andreverse_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_copyplane_fullmask_unclipped.hlps b/andreverse_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..9ef7cb6 --- /dev/null +++ b/andreverse_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_copyplane_planemask_clipmask.hlps b/andreverse_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..ce21eac --- /dev/null +++ b/andreverse_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_copyplane_planemask_unclipped.hlps b/andreverse_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..2cd73d3 --- /dev/null +++ b/andreverse_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_opaquestip_fullmask_clipmask.hlps b/andreverse_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..4de3949 --- /dev/null +++ b/andreverse_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_opaquestip_fullmask_unclipped.hlps b/andreverse_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..b75b6ba --- /dev/null +++ b/andreverse_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_opaquestip_planemask_clipmask.hlps b/andreverse_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..1010734 --- /dev/null +++ b/andreverse_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_opaquestip_planemask_unclipped.hlps b/andreverse_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..5b8d789 --- /dev/null +++ b/andreverse_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_solid_fullmask_clipmask.hlps b/andreverse_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..8d78dc9 --- /dev/null +++ b/andreverse_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_solid_fullmask_unclipped.hlps b/andreverse_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..24a3718 --- /dev/null +++ b/andreverse_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_solid_planemask_clipmask.hlps b/andreverse_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..5f7e062 --- /dev/null +++ b/andreverse_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_solid_planemask_unclipped.hlps b/andreverse_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..d695345 --- /dev/null +++ b/andreverse_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_stipple_fullmask_clipmask.hlps b/andreverse_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..32fe6c4 --- /dev/null +++ b/andreverse_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_stipple_fullmask_unclipped.hlps b/andreverse_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..dcde57f --- /dev/null +++ b/andreverse_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_stipple_planemask_clipmask.hlps b/andreverse_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..7769bcc --- /dev/null +++ b/andreverse_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_stipple_planemask_unclipped.hlps b/andreverse_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..2bf7045 --- /dev/null +++ b/andreverse_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_tile_fullmask_clipmask.hlps b/andreverse_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..3cf3ea4 --- /dev/null +++ b/andreverse_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_tile_fullmask_unclipped.hlps b/andreverse_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..1013d5c --- /dev/null +++ b/andreverse_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + return color; +} diff --git a/andreverse_tile_planemask_clipmask.hlps b/andreverse_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..b0ab9b0 --- /dev/null +++ b/andreverse_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/andreverse_tile_planemask_unclipped.hlps b/andreverse_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..5e52e07 --- /dev/null +++ b/andreverse_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* andreverse shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_copyplane_fullmask_clipmask.hlps b/clear_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..504c8fb --- /dev/null +++ b/clear_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_copyplane_fullmask_unclipped.hlps b/clear_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..aca0981 --- /dev/null +++ b/clear_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_copyplane_planemask_clipmask.hlps b/clear_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..19b3a4e --- /dev/null +++ b/clear_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_copyplane_planemask_unclipped.hlps b/clear_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..542d607 --- /dev/null +++ b/clear_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_opaquestip_fullmask_clipmask.hlps b/clear_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..1001831 --- /dev/null +++ b/clear_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_opaquestip_fullmask_unclipped.hlps b/clear_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..b0ab733 --- /dev/null +++ b/clear_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_opaquestip_planemask_clipmask.hlps b/clear_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..9ac5201 --- /dev/null +++ b/clear_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_opaquestip_planemask_unclipped.hlps b/clear_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..7f9e170 --- /dev/null +++ b/clear_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_solid_fullmask_clipmask.hlps b/clear_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..1c5294a --- /dev/null +++ b/clear_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_solid_fullmask_unclipped.hlps b/clear_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..1d29ad0 --- /dev/null +++ b/clear_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_solid_planemask_clipmask.hlps b/clear_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..ee123c0 --- /dev/null +++ b/clear_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_solid_planemask_unclipped.hlps b/clear_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..85dcb25 --- /dev/null +++ b/clear_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_stipple_fullmask_clipmask.hlps b/clear_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..35ba2c1 --- /dev/null +++ b/clear_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_stipple_fullmask_unclipped.hlps b/clear_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..ccf3491 --- /dev/null +++ b/clear_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_stipple_planemask_clipmask.hlps b/clear_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..a338bba --- /dev/null +++ b/clear_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_stipple_planemask_unclipped.hlps b/clear_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..3921bcf --- /dev/null +++ b/clear_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_tile_fullmask_clipmask.hlps b/clear_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..add31ed --- /dev/null +++ b/clear_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_tile_fullmask_unclipped.hlps b/clear_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..0ab0209 --- /dev/null +++ b/clear_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + return color; +} diff --git a/clear_tile_planemask_clipmask.hlps b/clear_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..c399b9c --- /dev/null +++ b/clear_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/clear_tile_planemask_unclipped.hlps b/clear_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..1820fb9 --- /dev/null +++ b/clear_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* clear shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 0; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_copyplane_fullmask_clipmask.hlps b/copy_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..9039504 --- /dev/null +++ b/copy_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_copyplane_fullmask_unclipped.hlps b/copy_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..f72035d --- /dev/null +++ b/copy_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_copyplane_planemask_clipmask.hlps b/copy_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..280c944 --- /dev/null +++ b/copy_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_copyplane_planemask_unclipped.hlps b/copy_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..5dcdc73 --- /dev/null +++ b/copy_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_opaquestip_fullmask_clipmask.hlps b/copy_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..6d81d72 --- /dev/null +++ b/copy_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_opaquestip_fullmask_unclipped.hlps b/copy_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..cf0345f --- /dev/null +++ b/copy_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_opaquestip_planemask_clipmask.hlps b/copy_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..baa131b --- /dev/null +++ b/copy_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_opaquestip_planemask_unclipped.hlps b/copy_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..5ae448f --- /dev/null +++ b/copy_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_solid_fullmask_clipmask.hlps b/copy_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..c701ea7 --- /dev/null +++ b/copy_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_solid_fullmask_unclipped.hlps b/copy_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..ea133e9 --- /dev/null +++ b/copy_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_solid_planemask_clipmask.hlps b/copy_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..214027c --- /dev/null +++ b/copy_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_solid_planemask_unclipped.hlps b/copy_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..f598881 --- /dev/null +++ b/copy_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_stipple_fullmask_clipmask.hlps b/copy_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..44a3406 --- /dev/null +++ b/copy_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_stipple_fullmask_unclipped.hlps b/copy_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..2a778d5 --- /dev/null +++ b/copy_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_stipple_planemask_clipmask.hlps b/copy_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..1c1b97a --- /dev/null +++ b/copy_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_stipple_planemask_unclipped.hlps b/copy_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..4f8db2e --- /dev/null +++ b/copy_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_tile_fullmask_clipmask.hlps b/copy_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..2e784f7 --- /dev/null +++ b/copy_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_tile_fullmask_unclipped.hlps b/copy_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..4234eb2 --- /dev/null +++ b/copy_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + return color; +} diff --git a/copy_tile_planemask_clipmask.hlps b/copy_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..2f4fee0 --- /dev/null +++ b/copy_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copy_tile_planemask_unclipped.hlps b/copy_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..c19b99f --- /dev/null +++ b/copy_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* copy shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_copyplane_fullmask_clipmask.hlps b/copyinverted_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..88f12a7 --- /dev/null +++ b/copyinverted_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_copyplane_fullmask_unclipped.hlps b/copyinverted_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..0690761 --- /dev/null +++ b/copyinverted_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_copyplane_planemask_clipmask.hlps b/copyinverted_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..3a0ad20 --- /dev/null +++ b/copyinverted_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_copyplane_planemask_unclipped.hlps b/copyinverted_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..0c890c9 --- /dev/null +++ b/copyinverted_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_opaquestip_fullmask_clipmask.hlps b/copyinverted_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..415131e --- /dev/null +++ b/copyinverted_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_opaquestip_fullmask_unclipped.hlps b/copyinverted_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..03755e8 --- /dev/null +++ b/copyinverted_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_opaquestip_planemask_clipmask.hlps b/copyinverted_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..1c7b6ad --- /dev/null +++ b/copyinverted_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_opaquestip_planemask_unclipped.hlps b/copyinverted_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..985e061 --- /dev/null +++ b/copyinverted_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_solid_fullmask_clipmask.hlps b/copyinverted_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..d874cc0 --- /dev/null +++ b/copyinverted_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_solid_fullmask_unclipped.hlps b/copyinverted_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..3042909 --- /dev/null +++ b/copyinverted_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_solid_planemask_clipmask.hlps b/copyinverted_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..8b42a4b --- /dev/null +++ b/copyinverted_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_solid_planemask_unclipped.hlps b/copyinverted_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..d839a0c --- /dev/null +++ b/copyinverted_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_stipple_fullmask_clipmask.hlps b/copyinverted_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..77ae71a --- /dev/null +++ b/copyinverted_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_stipple_fullmask_unclipped.hlps b/copyinverted_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..02f6e9e --- /dev/null +++ b/copyinverted_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_stipple_planemask_clipmask.hlps b/copyinverted_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..6f5ef6a --- /dev/null +++ b/copyinverted_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_stipple_planemask_unclipped.hlps b/copyinverted_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..85c69d9 --- /dev/null +++ b/copyinverted_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_tile_fullmask_clipmask.hlps b/copyinverted_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..5aed47a --- /dev/null +++ b/copyinverted_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_tile_fullmask_unclipped.hlps b/copyinverted_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..59056da --- /dev/null +++ b/copyinverted_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + return color; +} diff --git a/copyinverted_tile_planemask_clipmask.hlps b/copyinverted_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..3312ff9 --- /dev/null +++ b/copyinverted_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/copyinverted_tile_planemask_unclipped.hlps b/copyinverted_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..c2f8e21 --- /dev/null +++ b/copyinverted_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* copyinverted shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/core_glyphs.hlvs b/core_glyphs.hlvs new file mode 100644 index 0000000..64ce291 --- /dev/null +++ b/core_glyphs.hlvs @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +// This vertex shader takes inputs in integer pixels, as well as +// a glyph position in integer texels, and outputs +// in floating point coordinates understood by the DX drawing system. + +struct VS_INPUT { + uint2 pos :POSITION; + uint2 glyph_pos :TEXCOORD0; +}; + +struct VS_OUTPUT { + float2 tile_pos :TEXCOORD0; + float2 glyph_pos :TEXCOORD1; + float2 out_pos :TEXCOORD2; + float4 pos :SV_POSITION; +}; + +cbuffer info :register(b0) { + float2 wh; // Half width, half height of target drawable + uint2 tile_offset; + uint2 stipple_size; + uint2 clip_offset; // unused (glyph pos is taken from input.glyph_pos) + uint2 clip_size; // size of the entire glyph atlas +} + +cbuffer output_info :register(b1) { + uint2 out_offset; +} + +VS_OUTPUT main(VS_INPUT input) +{ + VS_OUTPUT output; + output.pos.x = input.pos.x / wh.x - 1.0f; + output.pos.y = -(input.pos.y / wh.y - 1.0f); + output.pos.z = 0; + output.pos.w = 1; + + output.tile_pos = input.pos - tile_offset; + output.tile_pos /= (float2)stipple_size; + + output.glyph_pos = input.glyph_pos / (float2)clip_size; + output.out_pos = input.pos - out_offset; + + return output; +} diff --git a/equiv_copyplane_fullmask_clipmask.hlps b/equiv_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..01e2c84 --- /dev/null +++ b/equiv_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_copyplane_fullmask_unclipped.hlps b/equiv_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..dd4b355 --- /dev/null +++ b/equiv_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_copyplane_planemask_clipmask.hlps b/equiv_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..d03cabf --- /dev/null +++ b/equiv_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_copyplane_planemask_unclipped.hlps b/equiv_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..5c614e8 --- /dev/null +++ b/equiv_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_opaquestip_fullmask_clipmask.hlps b/equiv_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..546f5ba --- /dev/null +++ b/equiv_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_opaquestip_fullmask_unclipped.hlps b/equiv_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..a719724 --- /dev/null +++ b/equiv_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_opaquestip_planemask_clipmask.hlps b/equiv_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..bffb828 --- /dev/null +++ b/equiv_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_opaquestip_planemask_unclipped.hlps b/equiv_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..b5b447c --- /dev/null +++ b/equiv_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_solid_fullmask_clipmask.hlps b/equiv_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..3291280 --- /dev/null +++ b/equiv_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_solid_fullmask_unclipped.hlps b/equiv_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..d885a66 --- /dev/null +++ b/equiv_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_solid_planemask_clipmask.hlps b/equiv_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..f042458 --- /dev/null +++ b/equiv_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_solid_planemask_unclipped.hlps b/equiv_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..ac4c753 --- /dev/null +++ b/equiv_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_stipple_fullmask_clipmask.hlps b/equiv_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..d6a780a --- /dev/null +++ b/equiv_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_stipple_fullmask_unclipped.hlps b/equiv_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..866e81d --- /dev/null +++ b/equiv_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_stipple_planemask_clipmask.hlps b/equiv_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..3351e17 --- /dev/null +++ b/equiv_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_stipple_planemask_unclipped.hlps b/equiv_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..42ee426 --- /dev/null +++ b/equiv_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_tile_fullmask_clipmask.hlps b/equiv_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..bcdffb3 --- /dev/null +++ b/equiv_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_tile_fullmask_unclipped.hlps b/equiv_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..585b0c6 --- /dev/null +++ b/equiv_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + return color; +} diff --git a/equiv_tile_planemask_clipmask.hlps b/equiv_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..ce8140c --- /dev/null +++ b/equiv_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/equiv_tile_planemask_unclipped.hlps b/equiv_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..d80593d --- /dev/null +++ b/equiv_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* equiv shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_copyplane_fullmask_clipmask.hlps b/invert_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..afdb175 --- /dev/null +++ b/invert_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_copyplane_fullmask_unclipped.hlps b/invert_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..acc1e9b --- /dev/null +++ b/invert_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_copyplane_planemask_clipmask.hlps b/invert_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..25b0e97 --- /dev/null +++ b/invert_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_copyplane_planemask_unclipped.hlps b/invert_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..128e906 --- /dev/null +++ b/invert_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_opaquestip_fullmask_clipmask.hlps b/invert_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..0dd698b --- /dev/null +++ b/invert_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_opaquestip_fullmask_unclipped.hlps b/invert_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..9f10e28 --- /dev/null +++ b/invert_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_opaquestip_planemask_clipmask.hlps b/invert_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..a84fc27 --- /dev/null +++ b/invert_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_opaquestip_planemask_unclipped.hlps b/invert_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..39a7f83 --- /dev/null +++ b/invert_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_solid_fullmask_clipmask.hlps b/invert_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..a3f2eaa --- /dev/null +++ b/invert_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_solid_fullmask_unclipped.hlps b/invert_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..189fbf7 --- /dev/null +++ b/invert_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_solid_planemask_clipmask.hlps b/invert_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..9613d87 --- /dev/null +++ b/invert_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_solid_planemask_unclipped.hlps b/invert_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..da71e23 --- /dev/null +++ b/invert_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_stipple_fullmask_clipmask.hlps b/invert_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..2e8be60 --- /dev/null +++ b/invert_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_stipple_fullmask_unclipped.hlps b/invert_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..e30d963 --- /dev/null +++ b/invert_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_stipple_planemask_clipmask.hlps b/invert_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..a48b48a --- /dev/null +++ b/invert_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_stipple_planemask_unclipped.hlps b/invert_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..f7566fa --- /dev/null +++ b/invert_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_tile_fullmask_clipmask.hlps b/invert_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..22089f0 --- /dev/null +++ b/invert_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_tile_fullmask_unclipped.hlps b/invert_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..08c83e8 --- /dev/null +++ b/invert_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + return color; +} diff --git a/invert_tile_planemask_clipmask.hlps b/invert_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..696278c --- /dev/null +++ b/invert_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/invert_tile_planemask_unclipped.hlps b/invert_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..a623b29 --- /dev/null +++ b/invert_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* invert shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/line2rect.hlgs b/line2rect.hlgs new file mode 100644 index 0000000..f5b3991 --- /dev/null +++ b/line2rect.hlgs @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +// This geometry shader takes a list of lines as input, and +// generates a (4 point) triangle strip representing a rectangle +// for each. + +struct vertex { + float2 tile_pos :TEXCOORD0; + float2 clip_pos :TEXCOORD1; + float2 out_pos :TEXCOORD2; + float4 pos :SV_POSITION; +}; + +[maxvertexcount(4)] +void main(line vertex input[2], inout TriangleStream<vertex> output) +{ + vertex v; + v.pos.z = 0; + v.pos.w = 1; + + v.pos.x = input[0].pos.x; + v.tile_pos.x = input[0].tile_pos.x; + v.clip_pos.x = input[0].clip_pos.x; + v.out_pos.x = input[0].out_pos.x; + v.pos.y = input[1].pos.y; + v.tile_pos.y = input[1].tile_pos.y; + v.clip_pos.y = input[1].clip_pos.y; + v.out_pos.y = input[1].out_pos.y; + output.Append(v); + + v.pos.x = input[0].pos.x; + v.tile_pos.x = input[0].tile_pos.x; + v.clip_pos.x = input[0].clip_pos.x; + v.out_pos.x = input[0].out_pos.x; + v.pos.y = input[0].pos.y; + v.tile_pos.y = input[0].tile_pos.y; + v.clip_pos.y = input[0].clip_pos.y; + v.out_pos.y = input[0].out_pos.y; + output.Append(v); + + v.pos.x = input[1].pos.x; + v.tile_pos.x = input[1].tile_pos.x; + v.clip_pos.x = input[1].clip_pos.x; + v.out_pos.x = input[1].out_pos.x; + v.pos.y = input[1].pos.y; + v.tile_pos.y = input[1].tile_pos.y; + v.clip_pos.y = input[1].clip_pos.y; + v.out_pos.y = input[1].out_pos.y; + output.Append(v); + + v.pos.x = input[1].pos.x; + v.tile_pos.x = input[1].tile_pos.x; + v.clip_pos.x = input[1].clip_pos.x; + v.out_pos.x = input[1].out_pos.x; + v.pos.y = input[0].pos.y; + v.tile_pos.y = input[0].tile_pos.y; + v.clip_pos.y = input[0].clip_pos.y; + v.out_pos.y = input[0].out_pos.y; + output.Append(v); + + output.RestartStrip(); +} diff --git a/nand_copyplane_fullmask_clipmask.hlps b/nand_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..cc8b782 --- /dev/null +++ b/nand_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_copyplane_fullmask_unclipped.hlps b/nand_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..e323120 --- /dev/null +++ b/nand_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_copyplane_planemask_clipmask.hlps b/nand_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..a309e75 --- /dev/null +++ b/nand_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_copyplane_planemask_unclipped.hlps b/nand_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..13f5cba --- /dev/null +++ b/nand_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_opaquestip_fullmask_clipmask.hlps b/nand_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..16d57c2 --- /dev/null +++ b/nand_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_opaquestip_fullmask_unclipped.hlps b/nand_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..0b4666b --- /dev/null +++ b/nand_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_opaquestip_planemask_clipmask.hlps b/nand_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..63a00ac --- /dev/null +++ b/nand_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_opaquestip_planemask_unclipped.hlps b/nand_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..8f6d721 --- /dev/null +++ b/nand_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_solid_fullmask_clipmask.hlps b/nand_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..75e9011 --- /dev/null +++ b/nand_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_solid_fullmask_unclipped.hlps b/nand_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..6d10ce9 --- /dev/null +++ b/nand_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_solid_planemask_clipmask.hlps b/nand_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..a93596d --- /dev/null +++ b/nand_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_solid_planemask_unclipped.hlps b/nand_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..048208a --- /dev/null +++ b/nand_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_stipple_fullmask_clipmask.hlps b/nand_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..8946bfc --- /dev/null +++ b/nand_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_stipple_fullmask_unclipped.hlps b/nand_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..f9f3a19 --- /dev/null +++ b/nand_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_stipple_planemask_clipmask.hlps b/nand_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..4ed0370 --- /dev/null +++ b/nand_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_stipple_planemask_unclipped.hlps b/nand_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..6fec7b1 --- /dev/null +++ b/nand_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_tile_fullmask_clipmask.hlps b/nand_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..0db7867 --- /dev/null +++ b/nand_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_tile_fullmask_unclipped.hlps b/nand_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..a517732 --- /dev/null +++ b/nand_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + return color; +} diff --git a/nand_tile_planemask_clipmask.hlps b/nand_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..9c49b55 --- /dev/null +++ b/nand_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nand_tile_planemask_unclipped.hlps b/nand_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..2a45ac6 --- /dev/null +++ b/nand_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* nand shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_copyplane_fullmask_clipmask.hlps b/noop_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..3e40027 --- /dev/null +++ b/noop_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_copyplane_fullmask_unclipped.hlps b/noop_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..b596320 --- /dev/null +++ b/noop_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_copyplane_planemask_clipmask.hlps b/noop_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..4bd807b --- /dev/null +++ b/noop_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_copyplane_planemask_unclipped.hlps b/noop_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..a3c7816 --- /dev/null +++ b/noop_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_opaquestip_fullmask_clipmask.hlps b/noop_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..49b5d26 --- /dev/null +++ b/noop_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_opaquestip_fullmask_unclipped.hlps b/noop_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..918d44e --- /dev/null +++ b/noop_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_opaquestip_planemask_clipmask.hlps b/noop_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..149487f --- /dev/null +++ b/noop_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_opaquestip_planemask_unclipped.hlps b/noop_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..aeedf5c --- /dev/null +++ b/noop_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_solid_fullmask_clipmask.hlps b/noop_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..6c0ba3d --- /dev/null +++ b/noop_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_solid_fullmask_unclipped.hlps b/noop_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..a078e56 --- /dev/null +++ b/noop_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_solid_planemask_clipmask.hlps b/noop_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..600ebcc --- /dev/null +++ b/noop_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_solid_planemask_unclipped.hlps b/noop_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..6d72fa2 --- /dev/null +++ b/noop_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_stipple_fullmask_clipmask.hlps b/noop_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..5aff3e9 --- /dev/null +++ b/noop_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_stipple_fullmask_unclipped.hlps b/noop_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..67831cd --- /dev/null +++ b/noop_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_stipple_planemask_clipmask.hlps b/noop_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..53ce66e --- /dev/null +++ b/noop_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_stipple_planemask_unclipped.hlps b/noop_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..41e1386 --- /dev/null +++ b/noop_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_tile_fullmask_clipmask.hlps b/noop_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..dbaa398 --- /dev/null +++ b/noop_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_tile_fullmask_unclipped.hlps b/noop_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..3a745b9 --- /dev/null +++ b/noop_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + return color; +} diff --git a/noop_tile_planemask_clipmask.hlps b/noop_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..e5cd62e --- /dev/null +++ b/noop_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/noop_tile_planemask_unclipped.hlps b/noop_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..88ada73 --- /dev/null +++ b/noop_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* noop shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + discard; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_copyplane_fullmask_clipmask.hlps b/nor_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..99b3e6d --- /dev/null +++ b/nor_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_copyplane_fullmask_unclipped.hlps b/nor_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..713aae3 --- /dev/null +++ b/nor_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_copyplane_planemask_clipmask.hlps b/nor_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..dfd496a --- /dev/null +++ b/nor_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_copyplane_planemask_unclipped.hlps b/nor_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..a082063 --- /dev/null +++ b/nor_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_opaquestip_fullmask_clipmask.hlps b/nor_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..5de626c --- /dev/null +++ b/nor_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_opaquestip_fullmask_unclipped.hlps b/nor_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..bc765c6 --- /dev/null +++ b/nor_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_opaquestip_planemask_clipmask.hlps b/nor_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..6f00315 --- /dev/null +++ b/nor_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_opaquestip_planemask_unclipped.hlps b/nor_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..6a61919 --- /dev/null +++ b/nor_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_solid_fullmask_clipmask.hlps b/nor_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..f882b73 --- /dev/null +++ b/nor_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_solid_fullmask_unclipped.hlps b/nor_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..54e2fbe --- /dev/null +++ b/nor_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_solid_planemask_clipmask.hlps b/nor_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..94a0664 --- /dev/null +++ b/nor_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_solid_planemask_unclipped.hlps b/nor_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..be9ca4a --- /dev/null +++ b/nor_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_stipple_fullmask_clipmask.hlps b/nor_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..2ce52c3 --- /dev/null +++ b/nor_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_stipple_fullmask_unclipped.hlps b/nor_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..deb6b83 --- /dev/null +++ b/nor_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_stipple_planemask_clipmask.hlps b/nor_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..41bb6b7 --- /dev/null +++ b/nor_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_stipple_planemask_unclipped.hlps b/nor_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..68f8315 --- /dev/null +++ b/nor_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_tile_fullmask_clipmask.hlps b/nor_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..48e561c --- /dev/null +++ b/nor_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_tile_fullmask_unclipped.hlps b/nor_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..37528a0 --- /dev/null +++ b/nor_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + return color; +} diff --git a/nor_tile_planemask_clipmask.hlps b/nor_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..56d81c1 --- /dev/null +++ b/nor_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/nor_tile_planemask_unclipped.hlps b/nor_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..20dd7bc --- /dev/null +++ b/nor_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* nor shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color & ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_copyplane_fullmask_clipmask.hlps b/or_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..597d318 --- /dev/null +++ b/or_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* or shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_copyplane_fullmask_unclipped.hlps b/or_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..c4c6c78 --- /dev/null +++ b/or_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* or shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_copyplane_planemask_clipmask.hlps b/or_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..749b8ef --- /dev/null +++ b/or_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* or shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_copyplane_planemask_unclipped.hlps b/or_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..ab768c0 --- /dev/null +++ b/or_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* or shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_opaquestip_fullmask_clipmask.hlps b/or_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..f1ed805 --- /dev/null +++ b/or_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* or shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_opaquestip_fullmask_unclipped.hlps b/or_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..5fb6aea --- /dev/null +++ b/or_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* or shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_opaquestip_planemask_clipmask.hlps b/or_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..f28441e --- /dev/null +++ b/or_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* or shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_opaquestip_planemask_unclipped.hlps b/or_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..6f3362a --- /dev/null +++ b/or_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* or shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_solid_fullmask_clipmask.hlps b/or_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..688fa0c --- /dev/null +++ b/or_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* or shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_solid_fullmask_unclipped.hlps b/or_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..b7e3bb2 --- /dev/null +++ b/or_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* or shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_solid_planemask_clipmask.hlps b/or_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..dba30e0 --- /dev/null +++ b/or_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* or shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_solid_planemask_unclipped.hlps b/or_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..2070a6c --- /dev/null +++ b/or_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* or shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_stipple_fullmask_clipmask.hlps b/or_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..752b4f6 --- /dev/null +++ b/or_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* or shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_stipple_fullmask_unclipped.hlps b/or_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..e0a7e3d --- /dev/null +++ b/or_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* or shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_stipple_planemask_clipmask.hlps b/or_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..9268be5 --- /dev/null +++ b/or_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* or shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_stipple_planemask_unclipped.hlps b/or_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..a7f4d38 --- /dev/null +++ b/or_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* or shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_tile_fullmask_clipmask.hlps b/or_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..49caa65 --- /dev/null +++ b/or_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* or shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_tile_fullmask_unclipped.hlps b/or_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..cb39dfe --- /dev/null +++ b/or_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* or shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + return color; +} diff --git a/or_tile_planemask_clipmask.hlps b/or_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..ccb7244 --- /dev/null +++ b/or_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* or shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/or_tile_planemask_unclipped.hlps b/or_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..7209d86 --- /dev/null +++ b/or_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* or shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_copyplane_fullmask_clipmask.hlps b/orinverted_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..7e7cfef --- /dev/null +++ b/orinverted_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_copyplane_fullmask_unclipped.hlps b/orinverted_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..8dc166c --- /dev/null +++ b/orinverted_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_copyplane_planemask_clipmask.hlps b/orinverted_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..4b5be40 --- /dev/null +++ b/orinverted_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_copyplane_planemask_unclipped.hlps b/orinverted_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..ad8e9f9 --- /dev/null +++ b/orinverted_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_opaquestip_fullmask_clipmask.hlps b/orinverted_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..a31edca --- /dev/null +++ b/orinverted_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_opaquestip_fullmask_unclipped.hlps b/orinverted_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..b23e46e --- /dev/null +++ b/orinverted_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_opaquestip_planemask_clipmask.hlps b/orinverted_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..04b1c9e --- /dev/null +++ b/orinverted_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_opaquestip_planemask_unclipped.hlps b/orinverted_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..cdc5eb4 --- /dev/null +++ b/orinverted_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_solid_fullmask_clipmask.hlps b/orinverted_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..130d5ad --- /dev/null +++ b/orinverted_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_solid_fullmask_unclipped.hlps b/orinverted_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..bf67e57 --- /dev/null +++ b/orinverted_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_solid_planemask_clipmask.hlps b/orinverted_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..3bcb810 --- /dev/null +++ b/orinverted_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_solid_planemask_unclipped.hlps b/orinverted_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..da83064 --- /dev/null +++ b/orinverted_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_stipple_fullmask_clipmask.hlps b/orinverted_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..f07ad92 --- /dev/null +++ b/orinverted_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_stipple_fullmask_unclipped.hlps b/orinverted_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..f056390 --- /dev/null +++ b/orinverted_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_stipple_planemask_clipmask.hlps b/orinverted_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..c949eb6 --- /dev/null +++ b/orinverted_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_stipple_planemask_unclipped.hlps b/orinverted_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..8ae78f1 --- /dev/null +++ b/orinverted_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_tile_fullmask_clipmask.hlps b/orinverted_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..2d90d8c --- /dev/null +++ b/orinverted_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_tile_fullmask_unclipped.hlps b/orinverted_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..751f309 --- /dev/null +++ b/orinverted_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + return color; +} diff --git a/orinverted_tile_planemask_clipmask.hlps b/orinverted_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..cd8cd17 --- /dev/null +++ b/orinverted_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orinverted_tile_planemask_unclipped.hlps b/orinverted_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..3848dc4 --- /dev/null +++ b/orinverted_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* orinverted shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = ~color | out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_copyplane_fullmask_clipmask.hlps b/orreverse_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..269e21b --- /dev/null +++ b/orreverse_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_copyplane_fullmask_unclipped.hlps b/orreverse_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..b6f6fd6 --- /dev/null +++ b/orreverse_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_copyplane_planemask_clipmask.hlps b/orreverse_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..7a61977 --- /dev/null +++ b/orreverse_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_copyplane_planemask_unclipped.hlps b/orreverse_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..2285658 --- /dev/null +++ b/orreverse_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_opaquestip_fullmask_clipmask.hlps b/orreverse_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..b5553e9 --- /dev/null +++ b/orreverse_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_opaquestip_fullmask_unclipped.hlps b/orreverse_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..5d451fa --- /dev/null +++ b/orreverse_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_opaquestip_planemask_clipmask.hlps b/orreverse_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..e1ff657 --- /dev/null +++ b/orreverse_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_opaquestip_planemask_unclipped.hlps b/orreverse_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..5c00cc0 --- /dev/null +++ b/orreverse_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_solid_fullmask_clipmask.hlps b/orreverse_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..b2bebec --- /dev/null +++ b/orreverse_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_solid_fullmask_unclipped.hlps b/orreverse_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..07f63d4 --- /dev/null +++ b/orreverse_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_solid_planemask_clipmask.hlps b/orreverse_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..fce0811 --- /dev/null +++ b/orreverse_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_solid_planemask_unclipped.hlps b/orreverse_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..5a85de8 --- /dev/null +++ b/orreverse_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_stipple_fullmask_clipmask.hlps b/orreverse_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..ef350d7 --- /dev/null +++ b/orreverse_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_stipple_fullmask_unclipped.hlps b/orreverse_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..d811ee1 --- /dev/null +++ b/orreverse_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_stipple_planemask_clipmask.hlps b/orreverse_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..43c7317 --- /dev/null +++ b/orreverse_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_stipple_planemask_unclipped.hlps b/orreverse_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..b43e909 --- /dev/null +++ b/orreverse_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_tile_fullmask_clipmask.hlps b/orreverse_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..179398b --- /dev/null +++ b/orreverse_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_tile_fullmask_unclipped.hlps b/orreverse_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..979fb90 --- /dev/null +++ b/orreverse_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + return color; +} diff --git a/orreverse_tile_planemask_clipmask.hlps b/orreverse_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..9479413 --- /dev/null +++ b/orreverse_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/orreverse_tile_planemask_unclipped.hlps b/orreverse_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..c185572 --- /dev/null +++ b/orreverse_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* orreverse shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color | ~out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/render_glyphs.hlvs b/render_glyphs.hlvs new file mode 100644 index 0000000..be38a51 --- /dev/null +++ b/render_glyphs.hlvs @@ -0,0 +1,42 @@ +/* Automatically generated file; do not edit */ + +// This vertex shader takes inputs in integer pixels, as well as +// a glyph position in integer texels, and outputs +// in floating point coordinates understood by the DX drawing system. + +struct VS_INPUT { + uint2 pos :POSITION; + uint2 glyph_pos :TEXCOORD0; +}; + +struct VS_OUTPUT { + float2 tile_pos :TEXCOORD0; + float2 glyph_pos :TEXCOORD1; + float2 out_pos :TEXCOORD2; + float4 pos :SV_POSITION; +}; + +cbuffer info :register(b0) { + float2 wh; // Half width, half height of target drawable + uint2 tile_offset; + uint2 stipple_size; + uint2 clip_offset; // unused (glyph pos is taken from input.glyph_pos) + uint2 clip_size; // size of the entire glyph atlas +} + +VS_OUTPUT main(VS_INPUT input) +{ + VS_OUTPUT output; + output.pos.x = input.pos.x / wh.x - 1.0f; + output.pos.y = -(input.pos.y / wh.y - 1.0f); + output.pos.z = 0; + output.pos.w = 1; + + output.tile_pos = input.glyph_pos; + output.tile_pos /= (float2)stipple_size; + + output.glyph_pos = 0; + output.out_pos = 0; + + return output; +} diff --git a/render_simple.hlps b/render_simple.hlps new file mode 100644 index 0000000..6336a72 --- /dev/null +++ b/render_simple.hlps @@ -0,0 +1,21 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+
+ return s;
+}
diff --git a/render_simple_dswiz.hlps b/render_simple_dswiz.hlps new file mode 100644 index 0000000..be01390 --- /dev/null +++ b/render_simple_dswiz.hlps @@ -0,0 +1,21 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+
+ return s.a;
+}
diff --git a/render_simple_dswiz_mask.hlps b/render_simple_dswiz_mask.hlps new file mode 100644 index 0000000..5348aa0 --- /dev/null +++ b/render_simple_dswiz_mask.hlps @@ -0,0 +1,23 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader with mask */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + float4 m = mask.Sample(mask_sample, input.mask_pos); + s *= m.a;
+ return s.a;
+}
diff --git a/render_simple_dswiz_mask_ca.hlps b/render_simple_dswiz_mask_ca.hlps new file mode 100644 index 0000000..530de6a --- /dev/null +++ b/render_simple_dswiz_mask_ca.hlps @@ -0,0 +1,23 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader with mask, component alpha */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + float4 m = mask.Sample(mask_sample, input.mask_pos); + s *= m;
+ return s.a;
+}
diff --git a/render_simple_dswiz_mask_swiz.hlps b/render_simple_dswiz_mask_swiz.hlps new file mode 100644 index 0000000..5aa01c2 --- /dev/null +++ b/render_simple_dswiz_mask_swiz.hlps @@ -0,0 +1,24 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader with mask swizzled */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + float4 m = mask.Sample(mask_sample, input.mask_pos); + m.a = m.r; + s *= m.a;
+ return s.a;
+}
diff --git a/render_simple_dswiz_mask_swiz_ca.hlps b/render_simple_dswiz_mask_swiz_ca.hlps new file mode 100644 index 0000000..0e3578b --- /dev/null +++ b/render_simple_dswiz_mask_swiz_ca.hlps @@ -0,0 +1,24 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader with mask swizzled, component alpha */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + float4 m = mask.Sample(mask_sample, input.mask_pos); + m.a = m.r; + s *= m;
+ return s.a;
+}
diff --git a/render_simple_mask.hlps b/render_simple_mask.hlps new file mode 100644 index 0000000..326bd4d --- /dev/null +++ b/render_simple_mask.hlps @@ -0,0 +1,23 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader with mask */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + float4 m = mask.Sample(mask_sample, input.mask_pos); + s *= m.a;
+ return s;
+}
diff --git a/render_simple_mask_ca.hlps b/render_simple_mask_ca.hlps new file mode 100644 index 0000000..b87e93a --- /dev/null +++ b/render_simple_mask_ca.hlps @@ -0,0 +1,23 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader with mask, component alpha */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + float4 m = mask.Sample(mask_sample, input.mask_pos); + s *= m;
+ return s;
+}
diff --git a/render_simple_mask_swiz.hlps b/render_simple_mask_swiz.hlps new file mode 100644 index 0000000..52d1061 --- /dev/null +++ b/render_simple_mask_swiz.hlps @@ -0,0 +1,24 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader with mask swizzled */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + float4 m = mask.Sample(mask_sample, input.mask_pos); + m.a = m.r; + s *= m.a;
+ return s;
+}
diff --git a/render_simple_mask_swiz_ca.hlps b/render_simple_mask_swiz_ca.hlps new file mode 100644 index 0000000..1f191c8 --- /dev/null +++ b/render_simple_mask_swiz_ca.hlps @@ -0,0 +1,24 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader with mask swizzled, component alpha */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + float4 m = mask.Sample(mask_sample, input.mask_pos); + m.a = m.r; + s *= m;
+ return s;
+}
diff --git a/render_simple_sswiz.hlps b/render_simple_sswiz.hlps new file mode 100644 index 0000000..3f1b5e9 --- /dev/null +++ b/render_simple_sswiz.hlps @@ -0,0 +1,23 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0;
+ return s;
+}
diff --git a/render_simple_sswiz_dswiz.hlps b/render_simple_sswiz_dswiz.hlps new file mode 100644 index 0000000..7b982ea --- /dev/null +++ b/render_simple_sswiz_dswiz.hlps @@ -0,0 +1,23 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0;
+ return s.a;
+}
diff --git a/render_simple_sswiz_dswiz_mask.hlps b/render_simple_sswiz_dswiz_mask.hlps new file mode 100644 index 0000000..687220c --- /dev/null +++ b/render_simple_sswiz_dswiz_mask.hlps @@ -0,0 +1,25 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled with mask */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0; + float4 m = mask.Sample(mask_sample, input.mask_pos); + s *= m.a;
+ return s.a;
+}
diff --git a/render_simple_sswiz_dswiz_mask_ca.hlps b/render_simple_sswiz_dswiz_mask_ca.hlps new file mode 100644 index 0000000..c6f7eeb --- /dev/null +++ b/render_simple_sswiz_dswiz_mask_ca.hlps @@ -0,0 +1,25 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled with mask, component alpha */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0; + float4 m = mask.Sample(mask_sample, input.mask_pos); + s *= m;
+ return s.a;
+}
diff --git a/render_simple_sswiz_dswiz_mask_swiz.hlps b/render_simple_sswiz_dswiz_mask_swiz.hlps new file mode 100644 index 0000000..d2f76c2 --- /dev/null +++ b/render_simple_sswiz_dswiz_mask_swiz.hlps @@ -0,0 +1,26 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled with mask swizzled */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0; + float4 m = mask.Sample(mask_sample, input.mask_pos); + m.a = m.r; + s *= m.a;
+ return s.a;
+}
diff --git a/render_simple_sswiz_dswiz_mask_swiz_ca.hlps b/render_simple_sswiz_dswiz_mask_swiz_ca.hlps new file mode 100644 index 0000000..d48d571 --- /dev/null +++ b/render_simple_sswiz_dswiz_mask_swiz_ca.hlps @@ -0,0 +1,26 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled with mask swizzled, component alpha */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0; + float4 m = mask.Sample(mask_sample, input.mask_pos); + m.a = m.r; + s *= m;
+ return s.a;
+}
diff --git a/render_simple_sswiz_mask.hlps b/render_simple_sswiz_mask.hlps new file mode 100644 index 0000000..3d42904 --- /dev/null +++ b/render_simple_sswiz_mask.hlps @@ -0,0 +1,25 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled with mask */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0; + float4 m = mask.Sample(mask_sample, input.mask_pos); + s *= m.a;
+ return s;
+}
diff --git a/render_simple_sswiz_mask_ca.hlps b/render_simple_sswiz_mask_ca.hlps new file mode 100644 index 0000000..9450e13 --- /dev/null +++ b/render_simple_sswiz_mask_ca.hlps @@ -0,0 +1,25 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled with mask, component alpha */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0; + float4 m = mask.Sample(mask_sample, input.mask_pos); + s *= m;
+ return s;
+}
diff --git a/render_simple_sswiz_mask_swiz.hlps b/render_simple_sswiz_mask_swiz.hlps new file mode 100644 index 0000000..84e1288 --- /dev/null +++ b/render_simple_sswiz_mask_swiz.hlps @@ -0,0 +1,26 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled with mask swizzled */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0; + float4 m = mask.Sample(mask_sample, input.mask_pos); + m.a = m.r; + s *= m.a;
+ return s;
+}
diff --git a/render_simple_sswiz_mask_swiz_ca.hlps b/render_simple_sswiz_mask_swiz_ca.hlps new file mode 100644 index 0000000..211bc91 --- /dev/null +++ b/render_simple_sswiz_mask_swiz_ca.hlps @@ -0,0 +1,26 @@ +/* Automatically generated file; do not edit */
+
+/* simple render shader for source swizzled with mask swizzled, component alpha */
+
+SamplerState src_sample : register(s0);
+SamplerState mask_sample : register(s1);
+
+Texture2D src : register(t0);
+Texture2D mask : register(t1);
+
+struct PS_INPUT {
+ float2 src_pos : TEXCOORD0;
+ float2 mask_pos : TEXCOORD1;
+};
+
+float4 main(PS_INPUT input) : SV_TARGET
+{
+ float4 s = src.Sample(src_sample, input.src_pos);
+ + s.a = s.r; + s.rgb = 0; + float4 m = mask.Sample(mask_sample, input.mask_pos); + m.a = m.r; + s *= m;
+ return s;
+}
diff --git a/set_copyplane_fullmask_clipmask.hlps b/set_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..e3daa02 --- /dev/null +++ b/set_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* set shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_copyplane_fullmask_unclipped.hlps b/set_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..fe628bf --- /dev/null +++ b/set_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* set shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_copyplane_planemask_clipmask.hlps b/set_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..77aa4db --- /dev/null +++ b/set_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* set shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_copyplane_planemask_unclipped.hlps b/set_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..5792bc0 --- /dev/null +++ b/set_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* set shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_opaquestip_fullmask_clipmask.hlps b/set_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..f5656b8 --- /dev/null +++ b/set_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* set shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_opaquestip_fullmask_unclipped.hlps b/set_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..6336528 --- /dev/null +++ b/set_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* set shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_opaquestip_planemask_clipmask.hlps b/set_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..b352e31 --- /dev/null +++ b/set_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* set shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_opaquestip_planemask_unclipped.hlps b/set_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..ad68b30 --- /dev/null +++ b/set_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* set shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_solid_fullmask_clipmask.hlps b/set_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..fda76c0 --- /dev/null +++ b/set_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* set shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_solid_fullmask_unclipped.hlps b/set_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..b6b2003 --- /dev/null +++ b/set_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* set shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_solid_planemask_clipmask.hlps b/set_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..bf8af90 --- /dev/null +++ b/set_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* set shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_solid_planemask_unclipped.hlps b/set_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..a80e70f --- /dev/null +++ b/set_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* set shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_stipple_fullmask_clipmask.hlps b/set_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..3c7c36a --- /dev/null +++ b/set_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* set shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_stipple_fullmask_unclipped.hlps b/set_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..ff3db4b --- /dev/null +++ b/set_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* set shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_stipple_planemask_clipmask.hlps b/set_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..c695247 --- /dev/null +++ b/set_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* set shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_stipple_planemask_unclipped.hlps b/set_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..596ddbb --- /dev/null +++ b/set_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* set shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_tile_fullmask_clipmask.hlps b/set_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..313310a --- /dev/null +++ b/set_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* set shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_tile_fullmask_unclipped.hlps b/set_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..371c4de --- /dev/null +++ b/set_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* set shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + return color; +} diff --git a/set_tile_planemask_clipmask.hlps b/set_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..073e516 --- /dev/null +++ b/set_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* set shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/set_tile_planemask_unclipped.hlps b/set_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..217bcf5 --- /dev/null +++ b/set_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* set shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = 255; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/size_calc.hlvs b/size_calc.hlvs new file mode 100644 index 0000000..72d4c35 --- /dev/null +++ b/size_calc.hlvs @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +// This vertex shader takes inputs in integer pixels, as well as +// clip, tile, and output offsets in integer pixels, and outputs +// in floating point coordinates understood by the DX drawing system. + +struct VS_INPUT { + uint2 pos :POSITION; +}; + +struct VS_OUTPUT { + float2 tile_pos :TEXCOORD0; + float2 clip_pos :TEXCOORD1; + float2 out_pos :TEXCOORD2; + float4 pos :SV_POSITION; +}; + +cbuffer info :register(b0) { + float2 wh; // Half width, half height of target drawable + uint2 tile_offset; + uint2 stipple_size; // Set to 1 x 1 for tiles + uint2 clip_offset; + uint2 clip_size; +} + +cbuffer output_info :register(b1) { + uint2 out_offset; +} + +VS_OUTPUT main(VS_INPUT input) +{ + VS_OUTPUT output; + output.pos.x = input.pos.x / wh.x - 1.0f; + output.pos.y = -(input.pos.y / wh.y - 1.0f); + output.pos.z = 0; + output.pos.w = 1; + + output.tile_pos = input.pos - tile_offset; + output.tile_pos /= (float2)stipple_size; + + output.clip_pos = input.pos - clip_offset; + output.clip_pos /= (float2)clip_size; + + output.out_pos = input.pos - out_offset; + + return output; +} diff --git a/xor_copyplane_fullmask_clipmask.hlps b/xor_copyplane_fullmask_clipmask.hlps new file mode 100644 index 0000000..b875521 --- /dev/null +++ b/xor_copyplane_fullmask_clipmask.hlps @@ -0,0 +1,59 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for copyplane with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_copyplane_fullmask_unclipped.hlps b/xor_copyplane_fullmask_unclipped.hlps new file mode 100644 index 0000000..190dd25 --- /dev/null +++ b/xor_copyplane_fullmask_unclipped.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for copyplane with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_copyplane_planemask_clipmask.hlps b/xor_copyplane_planemask_clipmask.hlps new file mode 100644 index 0000000..d28ea72 --- /dev/null +++ b/xor_copyplane_planemask_clipmask.hlps @@ -0,0 +1,62 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for copyplane with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_copyplane_planemask_unclipped.hlps b/xor_copyplane_planemask_unclipped.hlps new file mode 100644 index 0000000..a3a0117 --- /dev/null +++ b/xor_copyplane_planemask_unclipped.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for copyplane with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + if (any(color & plane)) + color = foreground; + else + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_opaquestip_fullmask_clipmask.hlps b/xor_opaquestip_fullmask_clipmask.hlps new file mode 100644 index 0000000..b21aad9 --- /dev/null +++ b/xor_opaquestip_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for opaquestip with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_opaquestip_fullmask_unclipped.hlps b/xor_opaquestip_fullmask_unclipped.hlps new file mode 100644 index 0000000..d8ff809 --- /dev/null +++ b/xor_opaquestip_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for opaquestip with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_opaquestip_planemask_clipmask.hlps b/xor_opaquestip_planemask_clipmask.hlps new file mode 100644 index 0000000..c74e1bf --- /dev/null +++ b/xor_opaquestip_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for opaquestip with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_opaquestip_planemask_unclipped.hlps b/xor_opaquestip_planemask_unclipped.hlps new file mode 100644 index 0000000..9c8b0b8 --- /dev/null +++ b/xor_opaquestip_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for opaquestip with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + color = foreground; + if (pt.r < 0.5) + color = background; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_solid_fullmask_clipmask.hlps b/xor_solid_fullmask_clipmask.hlps new file mode 100644 index 0000000..746276c --- /dev/null +++ b/xor_solid_fullmask_clipmask.hlps @@ -0,0 +1,51 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for solid with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_solid_fullmask_unclipped.hlps b/xor_solid_fullmask_unclipped.hlps new file mode 100644 index 0000000..ad2b57d --- /dev/null +++ b/xor_solid_fullmask_unclipped.hlps @@ -0,0 +1,43 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for solid with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_solid_planemask_clipmask.hlps b/xor_solid_planemask_clipmask.hlps new file mode 100644 index 0000000..2e28a72 --- /dev/null +++ b/xor_solid_planemask_clipmask.hlps @@ -0,0 +1,54 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for solid with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_solid_planemask_unclipped.hlps b/xor_solid_planemask_unclipped.hlps new file mode 100644 index 0000000..43fc021 --- /dev/null +++ b/xor_solid_planemask_unclipped.hlps @@ -0,0 +1,46 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for solid with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_stipple_fullmask_clipmask.hlps b/xor_stipple_fullmask_clipmask.hlps new file mode 100644 index 0000000..73f614b --- /dev/null +++ b/xor_stipple_fullmask_clipmask.hlps @@ -0,0 +1,57 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for stipple with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_stipple_fullmask_unclipped.hlps b/xor_stipple_fullmask_unclipped.hlps new file mode 100644 index 0000000..129872d --- /dev/null +++ b/xor_stipple_fullmask_unclipped.hlps @@ -0,0 +1,49 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for stipple with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_stipple_planemask_clipmask.hlps b/xor_stipple_planemask_clipmask.hlps new file mode 100644 index 0000000..07529a9 --- /dev/null +++ b/xor_stipple_planemask_clipmask.hlps @@ -0,0 +1,60 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for stipple with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_stipple_planemask_unclipped.hlps b/xor_stipple_planemask_unclipped.hlps new file mode 100644 index 0000000..d25d690 --- /dev/null +++ b/xor_stipple_planemask_unclipped.hlps @@ -0,0 +1,52 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for stipple with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D stipple : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + float4 pt = stipple.Sample(point_sample, input.tile_pos); + if (pt.r < 0.5) { + discard; + return 0; + } + color = foreground; + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_tile_fullmask_clipmask.hlps b/xor_tile_fullmask_clipmask.hlps new file mode 100644 index 0000000..d589e01 --- /dev/null +++ b/xor_tile_fullmask_clipmask.hlps @@ -0,0 +1,55 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for tile with fullmask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_tile_fullmask_unclipped.hlps b/xor_tile_fullmask_unclipped.hlps new file mode 100644 index 0000000..0864227 --- /dev/null +++ b/xor_tile_fullmask_unclipped.hlps @@ -0,0 +1,47 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for tile with fullmask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + return color; +} diff --git a/xor_tile_planemask_clipmask.hlps b/xor_tile_planemask_clipmask.hlps new file mode 100644 index 0000000..550c95b --- /dev/null +++ b/xor_tile_planemask_clipmask.hlps @@ -0,0 +1,58 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for tile with planemask and clipmask */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D clipmask : register(t1); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + // Test clip mask + float4 cm = clipmask.Sample(point_sample, input.clip_pos); + if (cm.r < 0.5) { + discard; + return 0; + } + + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} diff --git a/xor_tile_planemask_unclipped.hlps b/xor_tile_planemask_unclipped.hlps new file mode 100644 index 0000000..39b9fa4 --- /dev/null +++ b/xor_tile_planemask_unclipped.hlps @@ -0,0 +1,50 @@ +/* Automatically generated file; do not edit */ + +/* xor shader for tile with planemask and unclipped */ + +SamplerState point_sample; + +Texture2D<uint4> tile : register(t0); +Texture2D<uint4> output : register(t2); + +cbuffer colors :register(b0) { + uint4 foreground; + uint4 background; + uint4 planemask; +} + +cbuffer tile_stats :register(b1) { + uint4 plane; + uint2 tile_wh; +} + +struct PS_INPUT { + float2 tile_pos : TEXCOORD0; + float2 clip_pos : TEXCOORD1; + float2 out_pos : TEXCOORD2; +}; + +uint4 main(PS_INPUT input) : SV_TARGET +{ + uint4 color; + + // Load input color + int3 tp; + tp.xy = input.tile_pos.xy % tile_wh.xy; + tp.z = 0; + color = tile.Load(tp); + + // Load output color + int3 pos; + pos.xy = input.out_pos.xy; + pos.z = 0; + uint4 out_color = output.Load(pos); + + // rop + color = color ^ out_color; + + // planemask + color = (color & planemask) | (out_color & ~planemask); + + return color; +} |