mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
gallium: Remove curious st_visual::no_config
The gallium context creation API embeds storage for a whole st_visual even if the context is to have no config. no_config was being used to signal this, but we can just as easily check that the color format is non-NONE. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045>
This commit is contained in:
parent
421fbb5f5e
commit
6d81b9c972
3 changed files with 3 additions and 12 deletions
|
|
@ -354,10 +354,8 @@ dri_fill_st_visual(struct st_visual *stvis,
|
|||
{
|
||||
memset(stvis, 0, sizeof(*stvis));
|
||||
|
||||
if (!mode) {
|
||||
stvis->no_config = true;
|
||||
if (!mode)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Deduce the color format. */
|
||||
switch (mode->redMask) {
|
||||
|
|
|
|||
|
|
@ -194,8 +194,6 @@ struct st_egl_image
|
|||
*/
|
||||
struct st_visual
|
||||
{
|
||||
bool no_config;
|
||||
|
||||
/**
|
||||
* Available buffers. Bitfield of ST_ATTACHMENT_*_MASK bits.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -871,8 +871,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
|
|||
struct st_context *shared_ctx = (struct st_context *) shared_stctxi;
|
||||
struct st_context *st;
|
||||
struct pipe_context *pipe;
|
||||
struct gl_config* mode_ptr;
|
||||
struct gl_config mode;
|
||||
struct gl_config mode, *mode_ptr = &mode;
|
||||
gl_api api;
|
||||
bool no_error = false;
|
||||
unsigned ctx_flags = PIPE_CONTEXT_PREFER_THREADED;
|
||||
|
|
@ -936,12 +935,8 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
|
|||
}
|
||||
|
||||
st_visual_to_context_mode(&attribs->visual, &mode);
|
||||
|
||||
if (attribs->visual.no_config)
|
||||
if (attribs->visual.color_format == PIPE_FORMAT_NONE)
|
||||
mode_ptr = NULL;
|
||||
else
|
||||
mode_ptr = &mode;
|
||||
|
||||
st = st_create_context(api, pipe, mode_ptr, shared_ctx,
|
||||
&attribs->options, no_error);
|
||||
if (!st) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue