zink: limit gl_Layer clamping to drivers that need it
authorSoroushIMG <soroush.kashani@imgtec.com>
Wed, 26 Oct 2022 15:36:19 +0000 (16:36 +0100)
committerSoroushIMG <soroush.kashani@imgtec.com>
Wed, 26 Oct 2022 15:36:19 +0000 (16:36 +0100)
commitd50db14023885c0ec865954697eb574dce6527bf
tree1375d05eb89378581716063b5af23d9c899798a2
parent2562c9c5c6bfba1f4515a6d7f6da07985a8e315f
zink: limit gl_Layer clamping to drivers that need it

So far, only IMG drivers cannot handle out of bounds layer values.
Ideally, a vulkan extension will be drafted to detail this behavior.
But for now if KHR-GL46.texture_cube_map_array.color_depth_attachments
fails, then needs_sanitised_layer is probably needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19163>
src/gallium/drivers/zink/zink_compiler.c
src/gallium/drivers/zink/zink_compiler.h
src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_program.c
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_types.h