tu: Fix FragCoord offset when HW viewport offset is enabled

FragCoord seems to have the offset applied to it, so we don't need to
subtract it out. Fixes upcoming test
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.custom_resolve.monolithic.fdm_nonsubsampled_multiview_with_offset.

Fixes: b34b089ca1 ("tu: Use GRAS bin offset registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38451>
This commit is contained in:
Connor Abbott 2025-12-05 17:07:01 -05:00 committed by Marge Bot
parent b2c685af42
commit cd1e784148

View file

@ -7605,10 +7605,7 @@ fdm_apply_fs_params(struct tu_cmd_buffer *cmd,
*/
VkExtent2D area = frag_areas[MIN2(i, views - 1)];
VkRect2D bin = bins[MIN2(i, views - 1)];
VkOffset2D hw_viewport_offset = hw_viewport_offsets[MIN2(i, views - 1)];
VkOffset2D offset = tu_fdm_per_bin_offset(area, bin, common_bin_offset);
offset.x -= hw_viewport_offset.x;
offset.y -= hw_viewport_offset.y;
tu_cs_emit(cs, area.width);
tu_cs_emit(cs, area.height);