mesa/st: move msaa functions to direct call

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
This commit is contained in:
Dave Airlie 2021-12-07 12:55:27 +10:00 committed by Marge Bot
parent d16f514f19
commit 28bd406f50
6 changed files with 13 additions and 36 deletions

View File

@ -272,15 +272,6 @@ struct dd_function_table {
/*@}*/
/**
* \name Functions for GL_ARB_sample_locations
*/
void (*GetProgrammableSampleCaps)(struct gl_context *ctx,
const struct gl_framebuffer *fb,
GLuint *bits, GLuint *width, GLuint *height);
/*@}*/
/**
* \name GREMEDY debug/marker functions
*/
@ -325,14 +316,6 @@ struct dd_function_table {
/**@}*/
/**
* \name GL_ARB_texture_multisample
*/
void (*GetSamplePosition)(struct gl_context *ctx,
struct gl_framebuffer *fb,
GLuint index,
GLfloat *outValue);
/**
* \name NV_vdpau_interop interface
*/

View File

@ -44,6 +44,7 @@
#include "version.h"
#include "state_tracker/st_cb_queryobj.h"
#include "state_tracker/st_cb_msaa.h"
#include "state_tracker/st_context.h"
/* This is a table driven implemetation of the glGet*v() functions.
@ -1314,8 +1315,8 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
break;
}
ctx->Driver.GetProgrammableSampleCaps(ctx, ctx->DrawBuffer,
&bits, &width, &height);
st_GetProgrammableSampleCaps(ctx, ctx->DrawBuffer,
&bits, &width, &height);
if (d->pname == GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB)
v->value_uint = width;

View File

@ -33,6 +33,7 @@
#include "main/state.h"
#include "state_tracker/st_format.h"
#include "state_tracker/st_cb_msaa.h"
/**
* Called via glSampleCoverageARB
@ -95,7 +96,7 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val)
return;
}
ctx->Driver.GetSamplePosition(ctx, ctx->DrawBuffer, index, val);
st_GetSamplePosition(ctx, ctx->DrawBuffer, index, val);
/* FBOs can be upside down (winsys always are)*/
if (ctx->DrawBuffer->FlipY)

View File

@ -37,7 +37,7 @@
#include "pipe/p_context.h"
static void
void
st_GetSamplePosition(struct gl_context *ctx,
struct gl_framebuffer *fb,
GLuint index,
@ -56,7 +56,7 @@ st_GetSamplePosition(struct gl_context *ctx,
}
static void
void
st_GetProgrammableSampleCaps(struct gl_context *ctx, const struct gl_framebuffer *fb,
GLuint *outBits, GLuint *outWidth, GLuint *outHeight)
{
@ -81,10 +81,3 @@ st_GetProgrammableSampleCaps(struct gl_context *ctx, const struct gl_framebuffer
*outHeight = 1;
}
}
void
st_init_msaa_functions(struct dd_function_table *functions)
{
functions->GetSamplePosition = st_GetSamplePosition;
functions->GetProgrammableSampleCaps = st_GetProgrammableSampleCaps;
}

View File

@ -31,9 +31,10 @@
#include "main/glheader.h"
struct dd_function_table;
extern void
st_init_msaa_functions(struct dd_function_table *functions);
void st_GetSamplePosition(struct gl_context *ctx,
struct gl_framebuffer *fb,
GLuint index,
GLfloat *outPos);
void st_GetProgrammableSampleCaps(struct gl_context *ctx, const struct gl_framebuffer *fb,
GLuint *outBits, GLuint *outWidth, GLuint *outHeight);
#endif

View File

@ -51,7 +51,6 @@
#include "st_cb_drawtex.h"
#include "st_cb_eglimage.h"
#include "st_cb_feedback.h"
#include "st_cb_msaa.h"
#include "st_cb_perfmon.h"
#include "st_cb_perfquery.h"
#include "st_cb_program.h"
@ -924,7 +923,6 @@ st_init_driver_functions(struct pipe_screen *screen,
st_init_eglimage_functions(functions, has_egl_image_validate);
st_init_msaa_functions(functions);
st_init_program_functions(functions);
st_init_flush_functions(screen, functions);
st_init_compute_functions(functions);