#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
#[rustc_const_unstable(feature = "const_alloc_layout", issue = "67521")]
#[inline]
pub const fn array<T>(n: usize) -> Result<Self, LayoutError> {
// Reduce the amount of code we need to monomorphize per `T`.
return inner(mem::size_of::<T>(), Alignment::of::<T>(), n);
#[inline]
const fn inner(
element_size: usize,
align: Alignment,
n: usize,
) -> Result<Layout, LayoutError> {
// We need to check two things about the size:
// - That the total size won't overflow a `usize`, and
// - That the total size still fits in an `isize`.
// By using division we can check them both with a single threshold.
// That'd usually be a bad idea, but thankfully here the element size
// and alignment are constants, so the compiler will fold all of it.
if element_size != 0 && n > Layout::max_size_for_align(align) / element_size {
return Err(LayoutError);
}
let array_size = element_size * n;
// SAFETY: We just checked above that the `array_size` will not
// exceed `isize::MAX` even when rounded up to the alignment.
// And `Alignment` guarantees it's a power of two.
unsafe { Ok(Layout::from_size_align_unchecked(array_size, align.as_usize())) }
}
}
library/std/src/collections/hash/map.rs
.for(int i = 0; i < 0x7FFFFFFF; i++)
malloc(0xFFFF);
cl_show_others_alpha
❯ vulkaninfo | grep driver
VK_LUNARG_direct_driver_loading : extension revision 1
driverVersion = 535.113.1.0 (2245804096)
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
driverInfo = 535.113.01
driverUUID = 933fe1d1-72b1-5d20-bfe7-dea2c41b409b
driverUUID = 933fe1d1-72b1-5d20-bfe7-dea2c41b409b
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
driverInfo = 535.113.01
VK_KHR_driver_properties : extension revision 1
> vulkaninfo | Select-String driver
WARNING: [Loader Message] Code 0 : windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OW_OVERLAY uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OW_OBS_HOOK uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OBS_HOOK uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OBS_HOOK uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OBS_HOOK uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
driverVersion = 531.41.0.0 (2227847168)
VkPhysicalDeviceDriverProperties:
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
driverInfo = 531.41
driverUUID = a9317914-87cc-57aa-bfc0-d632a611cf56
driverUUID = a9317914-87cc-57aa-bfc0-d632a611cf56
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
driverInfo = 531.41
VK_KHR_driver_properties : extension revision 1
> vulkaninfo | Select-String driver
WARNING: [Loader Message] Code 0 : windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OW_OVERLAY uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OW_OBS_HOOK uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OBS_HOOK uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OBS_HOOK uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_OBS_HOOK uses API version 1.2 which is older than the application specified API version of 1.3. May cause issues.
driverVersion = 531.41.0.0 (2227847168)
VkPhysicalDeviceDriverProperties:
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
driverInfo = 531.41
driverUUID = a9317914-87cc-57aa-bfc0-d632a611cf56
driverUUID = a9317914-87cc-57aa-bfc0-d632a611cf56
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
driverInfo = 531.41
VK_KHR_driver_properties : extension revision 1
ls
> rm -rf a
Remove-Item: A parameter cannot be found that matches parameter name 'rf'.
> rm -r -f a
Remove-Item: Parameter cannot be processed because the parameter name 'f' is ambiguous. Possible matches include: -Filter -Force.
> rm -r -Force a
>
IJob::Done
is added to perform these final computations. This function will be called automatically on the main thread by the job pool, for all jobs that have finished their Run
function. Hence, polling the current state of jobs is not necessary anymore for most use-cases.
The CJobPool::Update
function is adde...MeshInstance2D
INSTANCE_CUSTOM
should only be available when I use instancing, no? then I'd have many more problems with storing data I think. Am I understanding instancing wrong?gl_VertexIndex
alternative?TileMap
equivalent 3D node I thinkTileMap
equivalent 3D node I think gl_VertexIndex
alternative? c79e4c2
Add option to disable ghost map hash check. - furo321
c743ed5
Increase MAX_ACTIVE_GHOSTS from 8 to 256 - furo321
4f6ce37
Add date column to ghost browser - furo321
dc439a8
Ghost browser UI Improvements - furo321
b90995d
Add option to always save ghosts, not only personal bests. - furo321
dadb142
Add cl_race_ghost_alpha
, add title for ghost settings. - furo321
28f4739
Merge pull request #7375 from furo321/improve-ghosts - def-