DeviceLimits .java

com.mojang.renderpearl.api.device.DeviceLimits (record, 21 lines): members: maxAnisotropy, minUniformOffsetAlignment, maxTextureSize, maxColorAttachments.

com.mojang.renderpearl.api.devicerecord21 linesclient631 B

API Surface (2)

record DeviceLimits(int maxAnisotropy, int minUniformOffsetAlignment, int maxTextureSize, long maxMemoryAllocationSize, int maxMultiDrawDirectInterleavedDrawCount, int maxColorAttachments, int maxDrawIndirectDrawCount)
int maxTextureSizeForFormat(final GpuFormat format)

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

DeviceLimits.java21 lines · Minecraft 26.3 · verbatim
1
package com.mojang.renderpearl.api.device;
2
3
import com.mojang.renderpearl.api.GpuFormat;
4
import net.fabricmc.api.EnvType;
5
import net.fabricmc.api.Environment;
6
7
@Environment(EnvType.CLIENT)
8
public record DeviceLimits(
9
	int maxAnisotropy,
10
	int minUniformOffsetAlignment,
11
	int maxTextureSize,
12
	long maxMemoryAllocationSize,
13
	int maxMultiDrawDirectInterleavedDrawCount,
14
	int maxColorAttachments,
15
	int maxDrawIndirectDrawCount
16
) {
17
	public int maxTextureSizeForFormat(final GpuFormat format) {
18
		return Integer.highestOneBit(Math.min(this.maxTextureSize, (int)Math.sqrt((double)this.maxMemoryAllocationSize / format.blockSize())));
19
	}
20
}
21

Decompiled Minecraft 26.3 source of DeviceLimits (com/mojang/renderpearl/api/device/DeviceLimits.java) with Mojang official mappings, stored verbatim on the site.