forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1629359 - Update parking_lot to 0.10 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70646
- Loading branch information
Showing
62 changed files
with
11,426 additions
and
10,014 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"files":{"Cargo.toml":"d1a212ec3097c36853d5a06f59ce7b863611b308160c6dcba97a2fcaf5a2a10e","README.md":"aa7ff84146655d3957c043b5f71dc439712392c3a18c8c397d8c179bc43f75c0","shaders/blit.hlsl":"a00c57d25b6704a57cd17923c5b7a47608b3ab17b96e7e2ab1172283dc841194","shaders/clear.hlsl":"9b6747a76dabe37ff8e069cdbb8a9c22f6cf71a6d3041d358cd1569d1bb8e10f","shaders/copy.hlsl":"0a164e64b28e62e1d8895159c13e5aa9c74891f61d54939c0f79b08a2a5223c9","src/conv.rs":"253cfbbc8c5ccc02a4d72afe139819b059047b6743f2d7facec844454d9101d4","src/debug.rs":"6da6b8c5172a6b061e2f3db13473c6013d12c6467ddd073f4de8ee3112c69c8c","src/device.rs":"c446408ce389a10c3e02ff198e1e56966082c1b8cb2fdc5b27d09fc6b2904ae0","src/dxgi.rs":"4923fe1333cae98be33718dfb9a3a57470e6c9a0a6be9f7c738006cab9a3bc93","src/internal.rs":"d7b25c6e8b96a333531d525217723cc0be5def8788ef2c3084e29a31dc8e626d","src/lib.rs":"f36e568ec0b5ee132439b1ee344305aaf8c909b25feccbf90476e4bda061d692","src/shader.rs":"8830e96b702601a621c65b2560a58c752b5d8e123569f73a5017abcc2df7889a"},"package":"c66c77836ff26cf9916e5c8745715a22eae1fc61d994ffa0bea8a7dbd708ece2"} | ||
{"files":{"Cargo.toml":"9395d7e87f0c91d4900088cdbeb0ca8a0d4526911ece1de9cfc746974a9eec4e","README.md":"5c66af7bc110525a57c757859b9b93468ae54222e6ce9ce5ffd55b2a6ca596b9","shaders/blit.hlsl":"92a8b404ee956ceff2728ec8dd68969fba4c32a79f4d879f069a294f245a867c","shaders/clear.hlsl":"b715a0d8ccebd858531de845fdb3f1b31f25d3f62266238cd1d417006a07957c","shaders/copy.hlsl":"13ca6a1826eb5d252332d2bd75cc7f2e13c029a72006d141118d10ea5fb9856b","src/conv.rs":"69845245e8100921c14d3c9ac7b66e734cb167f16d397b15d723e42b93f9ecf0","src/debug.rs":"f51aa06d7eec0eb352ca7d401c474a075a10a01bbc31ea7e9c62973d7105112f","src/device.rs":"c41ba79b013c8dccd6e37fd0e713341066e4e4d16b337fdc108b4c6c09d55898","src/dxgi.rs":"8587c85d6d4223d23143b1b2dcf52d22615ad93852957bc0a0d13dd9bf057d25","src/internal.rs":"d2440eb4734f0765b86c6a3f6ef82005af4b998c1b449a48bd262a76b62845b4","src/lib.rs":"5f25d95df828ce8c3c3a463d80b39a4c981ae0ba50496a51229fa9e9894e9026","src/shader.rs":"58f9ccb451eb9e0db4b27b3b2901c7a9008e95279abb341a0bd30fdf1b45879c"},"package":"d7527cfcd7d1eec6b99f81891293bdd2a41d044ace009717264e5f3b10ce5b86"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# gfx_device_dx11 | ||
|
||
[DX11](https://msdn.microsoft.com/en-us/library/windows/desktop/ff476080(v=vs.85).aspx) backend for gfx. | ||
|
||
## Normalized Coordinates | ||
|
||
Render | Depth | Texture | ||
-------|-------|-------- | ||
![render_coordinates](../../../info/gl_render_coordinates.png) | ![depth_coordinates](../../../info/dx_depth_coordinates.png) | ![texture_coordinates](../../../info/dx_texture_coordinates.png) | ||
|
||
## Mirroring | ||
|
||
TODO | ||
# gfx_device_dx11 | ||
|
||
[DX11](https://msdn.microsoft.com/en-us/library/windows/desktop/ff476080(v=vs.85).aspx) backend for gfx. | ||
|
||
## Normalized Coordinates | ||
|
||
Render | Depth | Texture | ||
-------|-------|-------- | ||
![render_coordinates](../../../info/gl_render_coordinates.png) | ![depth_coordinates](../../../info/dx_depth_coordinates.png) | ![texture_coordinates](../../../info/dx_texture_coordinates.png) | ||
|
||
## Mirroring | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,63 @@ | ||
cbuffer Region : register(b0) { | ||
float2 offset; | ||
float2 extent; | ||
float z; | ||
float level; | ||
}; | ||
|
||
struct VsOutput { | ||
float4 pos: SV_POSITION; | ||
float4 uv: TEXCOORD0; | ||
}; | ||
|
||
// Create a screen filling triangle | ||
VsOutput vs_blit_2d(uint id: SV_VertexID) { | ||
float2 coord = float2((id << 1) & 2, id & 2); | ||
VsOutput output = { | ||
float4(float2(-1.0, 1.0) + coord * float2(2.0, -2.0), 0.0, 1.0), | ||
float4(offset + coord * extent, z, level) | ||
}; | ||
return output; | ||
} | ||
|
||
SamplerState BlitSampler : register(s0); | ||
|
||
Texture2DArray<uint4> BlitSrc_Uint : register(t0); | ||
Texture2DArray<int4> BlitSrc_Sint : register(t0); | ||
Texture2DArray<float4> BlitSrc_Float : register(t0); | ||
|
||
// TODO: get rid of GetDimensions call | ||
uint4 Nearest_Uint(float4 uv) | ||
{ | ||
float4 size; | ||
BlitSrc_Uint.GetDimensions(0, size.x, size.y, size.z, size.w); | ||
|
||
float2 pix = uv.xy * size.xy; | ||
|
||
return BlitSrc_Uint.Load(int4(int2(pix), uv.zw)); | ||
} | ||
|
||
int4 Nearest_Sint(float4 uv) | ||
{ | ||
float4 size; | ||
BlitSrc_Sint.GetDimensions(0, size.x, size.y, size.z, size.w); | ||
|
||
float2 pix = uv.xy * size.xy; | ||
|
||
return BlitSrc_Sint.Load(int4(int2(pix), uv.zw)); | ||
} | ||
|
||
uint4 ps_blit_2d_uint(VsOutput input) : SV_Target | ||
{ | ||
return Nearest_Uint(input.uv); | ||
} | ||
|
||
int4 ps_blit_2d_int(VsOutput input) : SV_Target | ||
{ | ||
return Nearest_Sint(input.uv); | ||
} | ||
|
||
float4 ps_blit_2d_float(VsOutput input) : SV_Target | ||
{ | ||
return BlitSrc_Float.SampleLevel(BlitSampler, input.uv.xyz, input.uv.w); | ||
} | ||
cbuffer Region : register(b0) { | ||
float2 offset; | ||
float2 extent; | ||
float z; | ||
float level; | ||
}; | ||
|
||
struct VsOutput { | ||
float4 pos: SV_POSITION; | ||
float4 uv: TEXCOORD0; | ||
}; | ||
|
||
// Create a screen filling triangle | ||
VsOutput vs_blit_2d(uint id: SV_VertexID) { | ||
float2 coord = float2((id << 1) & 2, id & 2); | ||
VsOutput output = { | ||
float4(float2(-1.0, 1.0) + coord * float2(2.0, -2.0), 0.0, 1.0), | ||
float4(offset + coord * extent, z, level) | ||
}; | ||
return output; | ||
} | ||
|
||
SamplerState BlitSampler : register(s0); | ||
|
||
Texture2DArray<uint4> BlitSrc_Uint : register(t0); | ||
Texture2DArray<int4> BlitSrc_Sint : register(t0); | ||
Texture2DArray<float4> BlitSrc_Float : register(t0); | ||
|
||
// TODO: get rid of GetDimensions call | ||
uint4 Nearest_Uint(float4 uv) | ||
{ | ||
float4 size; | ||
BlitSrc_Uint.GetDimensions(0, size.x, size.y, size.z, size.w); | ||
|
||
float2 pix = uv.xy * size.xy; | ||
|
||
return BlitSrc_Uint.Load(int4(int2(pix), uv.zw)); | ||
} | ||
|
||
int4 Nearest_Sint(float4 uv) | ||
{ | ||
float4 size; | ||
BlitSrc_Sint.GetDimensions(0, size.x, size.y, size.z, size.w); | ||
|
||
float2 pix = uv.xy * size.xy; | ||
|
||
return BlitSrc_Sint.Load(int4(int2(pix), uv.zw)); | ||
} | ||
|
||
uint4 ps_blit_2d_uint(VsOutput input) : SV_Target | ||
{ | ||
return Nearest_Uint(input.uv); | ||
} | ||
|
||
int4 ps_blit_2d_int(VsOutput input) : SV_Target | ||
{ | ||
return Nearest_Sint(input.uv); | ||
} | ||
|
||
float4 ps_blit_2d_float(VsOutput input) : SV_Target | ||
{ | ||
return BlitSrc_Float.SampleLevel(BlitSampler, input.uv.xyz, input.uv.w); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
cbuffer ClearColorF32 : register(b0) { float4 ClearF32; }; | ||
cbuffer ClearColorU32 : register(b0) { uint4 ClearU32; }; | ||
cbuffer ClearColorI32 : register(b0) { int4 ClearI32; }; | ||
cbuffer ClearColorDepth : register(b0) { float ClearDepth; }; | ||
|
||
// fullscreen triangle | ||
float4 vs_partial_clear(uint id : SV_VertexID) : SV_Position | ||
{ | ||
return float4( | ||
float(id / 2) * 4.0 - 1.0, | ||
float(id % 2) * 4.0 - 1.0, | ||
0.0, | ||
1.0 | ||
); | ||
} | ||
|
||
// TODO: send constants through VS as flat attributes | ||
float4 ps_partial_clear_float() : SV_Target0 { return ClearF32; } | ||
uint4 ps_partial_clear_uint() : SV_Target0 { return ClearU32; } | ||
int4 ps_partial_clear_int() : SV_Target0 { return ClearI32; } | ||
float ps_partial_clear_depth() : SV_Depth { return ClearDepth; } | ||
void ps_partial_clear_stencil() { } | ||
cbuffer ClearColorF32 : register(b0) { float4 ClearF32; }; | ||
cbuffer ClearColorU32 : register(b0) { uint4 ClearU32; }; | ||
cbuffer ClearColorI32 : register(b0) { int4 ClearI32; }; | ||
cbuffer ClearColorDepth : register(b0) { float ClearDepth; }; | ||
|
||
// fullscreen triangle | ||
float4 vs_partial_clear(uint id : SV_VertexID) : SV_Position | ||
{ | ||
return float4( | ||
float(id / 2) * 4.0 - 1.0, | ||
float(id % 2) * 4.0 - 1.0, | ||
0.0, | ||
1.0 | ||
); | ||
} | ||
|
||
// TODO: send constants through VS as flat attributes | ||
float4 ps_partial_clear_float() : SV_Target0 { return ClearF32; } | ||
uint4 ps_partial_clear_uint() : SV_Target0 { return ClearU32; } | ||
int4 ps_partial_clear_int() : SV_Target0 { return ClearI32; } | ||
float ps_partial_clear_depth() : SV_Depth { return ClearDepth; } | ||
void ps_partial_clear_stencil() { } |
Oops, something went wrong.