summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-12-07 12:55:27 +1000
committerMarge Bot <emma+marge@anholt.net>2021-12-08 19:06:48 +0000
commit28bd406f5087ae1d71d4040f9feb6ae781db0e39 (patch)
treeee062385ade2a5d3bb02d22be2a80eef1a1d5633
parentd16f514f192be16a959b20a48211c371b33d23dc (diff)
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>
-rw-r--r--src/mesa/main/dd.h17
-rw-r--r--src/mesa/main/get.c5
-rw-r--r--src/mesa/main/multisample.c3
-rw-r--r--src/mesa/state_tracker/st_cb_msaa.c11
-rw-r--r--src/mesa/state_tracker/st_cb_msaa.h11
-rw-r--r--src/mesa/state_tracker/st_context.c2
6 files changed, 13 insertions, 36 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index da52e1babf2..80e7ad5e745 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -273,15 +273,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
*/
/*@{*/
@@ -326,14 +317,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
*/
void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 0fb3d2d31da..8bdd07eb184 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -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;
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
index 33731e18f64..0dbf374b8cf 100644
--- a/src/mesa/main/multisample.c
+++ b/src/mesa/main/multisample.c
@@ -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)
diff --git a/src/mesa/state_tracker/st_cb_msaa.c b/src/mesa/state_tracker/st_cb_msaa.c
index fef3b7d2e4b..b85c9d8c16b 100644
--- a/src/mesa/state_tracker/st_cb_msaa.c
+++ b/src/mesa/state_tracker/st_cb_msaa.c
@@ -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;
-}
diff --git a/src/mesa/state_tracker/st_cb_msaa.h b/src/mesa/state_tracker/st_cb_msaa.h
index ba4c06f6b5b..d901a8df9a7 100644
--- a/src/mesa/state_tracker/st_cb_msaa.h
+++ b/src/mesa/state_tracker/st_cb_msaa.h
@@ -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
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 75b8c2ccfaa..26bdc0ddbe8 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -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);