mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 08:10:09 +01:00
mesa/st: drop multisample mask/locations state drivers bits
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261>
This commit is contained in:
parent
ddade693d0
commit
86a7a36164
5 changed files with 14 additions and 26 deletions
|
|
@ -1027,10 +1027,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
|||
case GL_SAMPLE_COVERAGE_ARB:
|
||||
if (ctx->Multisample.SampleCoverage == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 :
|
||||
_NEW_MULTISAMPLE,
|
||||
FLUSH_VERTICES(ctx, 0,
|
||||
GL_MULTISAMPLE_BIT | GL_ENABLE_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
|
||||
ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
|
||||
ctx->Multisample.SampleCoverage = state;
|
||||
break;
|
||||
case GL_SAMPLE_COVERAGE_INVERT_ARB:
|
||||
|
|
@ -1038,10 +1037,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
|||
goto invalid_enum_error;
|
||||
if (ctx->Multisample.SampleCoverageInvert == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 :
|
||||
_NEW_MULTISAMPLE,
|
||||
GL_MULTISAMPLE_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
|
||||
FLUSH_VERTICES(ctx, 0, GL_MULTISAMPLE_BIT);
|
||||
ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
|
||||
ctx->Multisample.SampleCoverageInvert = state;
|
||||
break;
|
||||
|
||||
|
|
@ -1298,9 +1295,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
|||
goto invalid_enum_error;
|
||||
if (ctx->Multisample.SampleMask == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 :
|
||||
_NEW_MULTISAMPLE, 0);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
|
||||
FLUSH_VERTICES(ctx, 0, 0);
|
||||
ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
|
||||
ctx->Multisample.SampleMask = state;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
|
||||
#include "state_tracker/st_cb_fbo.h"
|
||||
#include "state_tracker/st_cb_eglimage.h"
|
||||
#include "state_tracker/st_context.h"
|
||||
|
||||
/**
|
||||
* Notes:
|
||||
|
|
@ -1730,7 +1731,7 @@ framebuffer_parameteri(struct gl_context *ctx, struct gl_framebuffer *fb,
|
|||
case GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB:
|
||||
case GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB:
|
||||
if (fb == ctx->DrawBuffer)
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSampleLocations;
|
||||
ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
|
||||
break;
|
||||
default:
|
||||
invalidate_framebuffer(fb);
|
||||
|
|
@ -3149,7 +3150,7 @@ _mesa_bind_framebuffers(struct gl_context *ctx,
|
|||
|
||||
if (bindDrawBuf) {
|
||||
FLUSH_VERTICES(ctx, _NEW_BUFFERS, 0);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSampleLocations;
|
||||
ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
|
||||
|
||||
/* check if old framebuffer had any texture attachments */
|
||||
if (oldDrawFb)
|
||||
|
|
@ -5454,7 +5455,7 @@ sample_locations(struct gl_context *ctx, struct gl_framebuffer *fb,
|
|||
}
|
||||
|
||||
if (fb == ctx->DrawBuffer)
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSampleLocations;
|
||||
ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
|
|
|
|||
|
|
@ -4779,9 +4779,6 @@ struct gl_driver_flags
|
|||
/** gl_context::Multisample::Enabled */
|
||||
uint64_t NewMultisampleEnable;
|
||||
|
||||
/** gl_context::Multisample::SampleCoverage/SampleMaskValue */
|
||||
uint64_t NewSampleMask;
|
||||
|
||||
/** gl_context::Multisample::(Min)SampleShading */
|
||||
uint64_t NewSampleShading;
|
||||
|
||||
|
|
@ -4794,9 +4791,6 @@ struct gl_driver_flags
|
|||
/** Shader constants (uniforms, program parameters, state constants) */
|
||||
uint64_t NewShaderConstants[MESA_SHADER_STAGES];
|
||||
|
||||
/** Programmable sample location state for gl_context::DrawBuffer */
|
||||
uint64_t NewSampleLocations;
|
||||
|
||||
/** For GL_CLAMP emulation */
|
||||
uint64_t NewSamplersWithClamp;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -52,9 +52,8 @@ _mesa_SampleCoverage(GLclampf value, GLboolean invert)
|
|||
ctx->Multisample.SampleCoverageValue == value)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 : _NEW_MULTISAMPLE,
|
||||
GL_MULTISAMPLE_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
|
||||
FLUSH_VERTICES(ctx, 0, GL_MULTISAMPLE_BIT);
|
||||
ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
|
||||
ctx->Multisample.SampleCoverageValue = value;
|
||||
ctx->Multisample.SampleCoverageInvert = invert;
|
||||
}
|
||||
|
|
@ -155,8 +154,8 @@ sample_maski(struct gl_context *ctx, GLuint index, GLbitfield mask)
|
|||
if (ctx->Multisample.SampleMaskValue == mask)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewSampleMask ? 0 : _NEW_MULTISAMPLE, 0);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSampleMask;
|
||||
FLUSH_VERTICES(ctx, 0, 0);
|
||||
ctx->NewDriverState |= ST_NEW_SAMPLE_STATE;
|
||||
ctx->Multisample.SampleMaskValue = mask;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -467,8 +467,6 @@ st_init_driver_flags(struct st_context *st)
|
|||
|
||||
f->NewMultisampleEnable = ST_NEW_BLEND | ST_NEW_RASTERIZER |
|
||||
ST_NEW_SAMPLE_STATE | ST_NEW_SAMPLE_SHADING;
|
||||
f->NewSampleMask = ST_NEW_SAMPLE_STATE;
|
||||
f->NewSampleLocations = ST_NEW_SAMPLE_STATE;
|
||||
f->NewSampleShading = ST_NEW_SAMPLE_SHADING;
|
||||
|
||||
/* This depends on what the gallium driver wants. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue