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.
This commit is contained in:
@@ -1457,10 +1457,10 @@
|
||||
</struct>
|
||||
|
||||
<struct name="Sampler State" min_ver="41">
|
||||
<field name="Border color Alpha" size="32" start="160" type="uint"/>
|
||||
<field name="Border color Blue" size="32" start="128" type="uint"/>
|
||||
<field name="Border color Green" size="32" start="96" type="uint"/>
|
||||
<field name="Border color Red" size="32" start="64" type="uint"/>
|
||||
<field name="Border color word 3" size="32" start="160" type="uint"/>
|
||||
<field name="Border color word 2" size="32" start="128" type="uint"/>
|
||||
<field name="Border color word 1" size="32" start="96" type="uint"/>
|
||||
<field name="Border color word 0" size="32" start="64" type="uint"/>
|
||||
|
||||
<field name="Maximum Anisotropy" size="2" start="61" type="uint"/>
|
||||
<field name="Border Color Mode" size="3" start="58" type="Border Color Mode"/>
|
||||
|
||||
Reference in New Issue
Block a user