OSDN Git Service

v3d: Create separate sampler states for the various blend formats.
authorEric Anholt <eric@anholt.net>
Thu, 27 Dec 2018 04:56:49 +0000 (20:56 -0800)
committerEric Anholt <eric@anholt.net>
Sun, 27 Jan 2019 16:30:03 +0000 (08:30 -0800)
commitc496b60ed8cec0f3a9df35ee96f8765fe38853b7
treedb6d29a50efe725c9cf7d73aaf9b46d409312786
parent5fe4250a2c7294d4d552759ccce43314dc61189f
v3d: Create separate sampler states for the various blend formats.

The sampler border color is encoded in the TMU's blending format (half
floats, 32-bit floats, or integers) and must be clamped to the format's
range unorm/snorm/int ranges by the driver.  Additionally, the TMU doesn't
know about how we're abusing the swizzle to support BGRA, A, and LA, so we
have to pre-swizzle the border color for those.

We don't really want to spend half a kb on sampler states in most cases,
so skip generating the variants when the border color is unused or is
0,0,0,0.
src/broadcom/cle/v3d_packet_v33.xml
src/gallium/drivers/v3d/v3d_context.h
src/gallium/drivers/v3d/v3d_uniforms.c
src/gallium/drivers/v3d/v3dx_state.c