mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
nv50/ir: fix texture size for msaa textures
These are scaled up in the descriptor, which doesn't really know about their MSAA-ness. So we have to shift them back down. Cc: mesa-stable Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10162>
This commit is contained in:
parent
723b000d27
commit
1baefe4119
1 changed files with 15 additions and 1 deletions
|
|
@ -1038,8 +1038,22 @@ bool
|
|||
NV50LoweringPreSSA::handleTXQ(TexInstruction *i)
|
||||
{
|
||||
Value *ms, *ms_x, *ms_y;
|
||||
if (i->tex.query == TXQ_DIMS)
|
||||
if (i->tex.query == TXQ_DIMS) {
|
||||
if (i->tex.target.isMS()) {
|
||||
bld.setPosition(i, true);
|
||||
loadTexMsInfo(i->tex.r * 4 * 2, &ms, &ms_x, &ms_y);
|
||||
int d = 0;
|
||||
if (i->tex.mask & 1) {
|
||||
bld.mkOp2(OP_SHR, TYPE_U32, i->getDef(d), i->getDef(d), ms_x);
|
||||
d++;
|
||||
}
|
||||
if (i->tex.mask & 2) {
|
||||
bld.mkOp2(OP_SHR, TYPE_U32, i->getDef(d), i->getDef(d), ms_y);
|
||||
d++;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
assert(i->tex.query == TXQ_TYPE);
|
||||
assert(i->tex.mask == 4);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue