zink: start a unified driver workarounds struct

eventually anything that checks driverID should be moved here for ease of
reference/updating

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15392>
This commit is contained in:
Mike Blumenkrantz 2022-03-13 12:11:33 -04:00
parent 0a80f94de0
commit 49a20e0981
2 changed files with 12 additions and 0 deletions

View File

@ -2056,6 +2056,12 @@ zink_get_sample_pixel_grid(struct pipe_screen *pscreen, unsigned sample_count,
*height = screen->maxSampleLocationGridSize[idx].height;
}
static void
init_driver_workarounds(struct zink_screen *screen)
{
screen->driver_workarounds.color_write_missing = !screen->info.have_EXT_color_write_enable;
}
static struct zink_screen *
zink_internal_create_screen(const struct pipe_screen_config *config)
{
@ -2266,6 +2272,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
screen->base.vertex_state_destroy = zink_cache_vertex_state_destroy;
glsl_type_singleton_init_or_ref();
init_driver_workarounds(screen);
return screen;
fail:

View File

@ -177,6 +177,10 @@ struct zink_screen {
} null_descriptor_hashes;
VkExtent2D maxSampleLocationGridSize[5];
struct {
bool color_write_missing;
} driver_workarounds;
};