mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 13:30:11 +01:00
gallium/swr: Fix crashes and failures in vertex fetch
This commit fixes two problems: - In some cases SWR does not correctly report to Gallium which formats are supported. - Incorrect LLVM instructions are used in vertex fetch in some situations Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com> Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4788>
This commit is contained in:
parent
de0d3d1726
commit
a93b728bc6
2 changed files with 7 additions and 3 deletions
|
|
@ -874,10 +874,8 @@ void FetchJit::JitGatherVertices(const FETCH_COMPILE_STATE& fetchState,
|
|||
Value* pGatherHi =
|
||||
GATHERPD(vZeroDouble, pStreamBaseGFX, vOffsetsHi, vMaskHi);
|
||||
|
||||
pGatherLo = VCVTPD2PS(pGatherLo);
|
||||
pGatherHi = VCVTPD2PS(pGatherHi);
|
||||
|
||||
Value* pGather = VSHUFFLE(pGatherLo, pGatherHi, vShufAll);
|
||||
pGather = FP_TRUNC(pGather, mSimdFP32Ty);
|
||||
|
||||
vVertexElements[currentVertexElement++] = pGather;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,6 +141,12 @@ swr_is_format_supported(struct pipe_screen *_screen,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (bind & PIPE_BIND_VERTEX_BUFFER) {
|
||||
if (mesa_to_swr_format(format) == (SWR_FORMAT)-1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC ||
|
||||
format_desc->layout == UTIL_FORMAT_LAYOUT_FXT1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue