Mesa (master): i965: Rename more camel-case functions to brw and underscore style
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 25 21:08:21 UTC 2021
Module: Mesa
Branch: master
Commit: 9591acb7b1b21bf5df655739f05cb5549fded30a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9591acb7b1b21bf5df655739f05cb5549fded30a
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Feb 22 16:46:16 2021 -0800
i965: Rename more camel-case functions to brw and underscore style
Acked-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>
---
src/mesa/drivers/dri/i965/brw_context.c | 30 +++++++-------
src/mesa/drivers/dri/i965/brw_context.h | 12 +++---
src/mesa/drivers/dri/i965/brw_program.c | 29 ++++++-------
src/mesa/drivers/dri/i965/intel_blit.c | 22 +++++-----
src/mesa/drivers/dri/i965/intel_blit.h | 22 +++++-----
src/mesa/drivers/dri/i965/intel_buffers.c | 8 ++--
src/mesa/drivers/dri/i965/intel_pixel.c | 8 ++--
src/mesa/drivers/dri/i965/intel_pixel.h | 50 +++++++++++------------
src/mesa/drivers/dri/i965/intel_pixel_bitmap.c | 36 ++++++++---------
src/mesa/drivers/dri/i965/intel_pixel_copy.c | 8 ++--
src/mesa/drivers/dri/i965/intel_pixel_draw.c | 14 +++----
src/mesa/drivers/dri/i965/intel_pixel_read.c | 8 ++--
src/mesa/drivers/dri/i965/intel_screen.c | 56 +++++++++++++-------------
src/mesa/drivers/dri/i965/intel_screen.h | 10 ++---
src/mesa/drivers/dri/i965/intel_tex.c | 18 ++++-----
src/mesa/drivers/dri/i965/intel_tex.h | 10 ++---
src/mesa/drivers/dri/i965/intel_tex_copy.c | 14 +++----
src/mesa/drivers/dri/i965/intel_tex_image.c | 54 ++++++++++++-------------
18 files changed, 205 insertions(+), 204 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 70358624c0c..1dcfdc8a018 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -929,12 +929,12 @@ brw_process_driconf_options(struct brw_context *brw)
}
GLboolean
-brwCreateContext(gl_api api,
- const struct gl_config *mesaVis,
- __DRIcontext *driContextPriv,
- const struct __DriverContextConfig *ctx_config,
- unsigned *dri_ctx_error,
- void *sharedContextPrivate)
+brw_create_context(gl_api api,
+ const struct gl_config *mesaVis,
+ __DRIcontext *driContextPriv,
+ const struct __DriverContextConfig *ctx_config,
+ unsigned *dri_ctx_error,
+ void *sharedContextPrivate)
{
struct gl_context *shareCtx = (struct gl_context *) sharedContextPrivate;
struct brw_screen *screen = driContextPriv->driScreenPriv->driverPrivate;
@@ -1012,7 +1012,7 @@ brwCreateContext(gl_api api,
if (!_mesa_initialize_context(ctx, api, mesaVis, shareCtx, &functions)) {
*dri_ctx_error = __DRI_CTX_ERROR_NO_MEMORY;
fprintf(stderr, "%s: failed to init mesa context\n", __func__);
- intelDestroyContext(driContextPriv);
+ brw_destroy_context(driContextPriv);
return false;
}
@@ -1067,7 +1067,7 @@ brwCreateContext(gl_api api,
brw->hw_ctx = brw_create_hw_context(brw->bufmgr);
if (!brw->hw_ctx && devinfo->gen >= 6) {
fprintf(stderr, "Failed to create hardware context.\n");
- intelDestroyContext(driContextPriv);
+ brw_destroy_context(driContextPriv);
return false;
}
@@ -1088,14 +1088,14 @@ brwCreateContext(gl_api api,
fprintf(stderr,
"Failed to set priority [%d:%d] for hardware context.\n",
ctx_config->priority, hw_priority);
- intelDestroyContext(driContextPriv);
+ brw_destroy_context(driContextPriv);
return false;
}
}
if (brw_init_pipe_control(brw, devinfo)) {
*dri_ctx_error = __DRI_CTX_ERROR_NO_MEMORY;
- intelDestroyContext(driContextPriv);
+ brw_destroy_context(driContextPriv);
return false;
}
@@ -1198,7 +1198,7 @@ brwCreateContext(gl_api api,
}
void
-intelDestroyContext(__DRIcontext * driContextPriv)
+brw_destroy_context(__DRIcontext *driContextPriv)
{
struct brw_context *brw =
(struct brw_context *) driContextPriv->driverPrivate;
@@ -1273,7 +1273,7 @@ intelDestroyContext(__DRIcontext * driContextPriv)
}
GLboolean
-intelUnbindContext(__DRIcontext * driContextPriv)
+brw_unbind_context(__DRIcontext *driContextPriv)
{
struct gl_context *ctx = driContextPriv->driverPrivate;
_mesa_glthread_finish(ctx);
@@ -1336,9 +1336,9 @@ brw_gles3_srgb_workaround(struct brw_context *brw, struct gl_framebuffer *fb)
}
GLboolean
-intelMakeCurrent(__DRIcontext * driContextPriv,
- __DRIdrawable * driDrawPriv,
- __DRIdrawable * driReadPriv)
+brw_make_current(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv)
{
struct brw_context *brw;
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 973655ebd74..a48f20b0bf7 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1283,12 +1283,12 @@ void brw_predraw_resolve_inputs(struct brw_context *brw, bool rendering,
void brw_resolve_for_dri2_flush(struct brw_context *brw,
__DRIdrawable *drawable);
-GLboolean brwCreateContext(gl_api api,
- const struct gl_config *mesaVis,
- __DRIcontext *driContextPriv,
- const struct __DriverContextConfig *ctx_config,
- unsigned *error,
- void *sharedContextPrivate);
+GLboolean brw_create_context(gl_api api,
+ const struct gl_config *mesaVis,
+ __DRIcontext *driContextPriv,
+ const struct __DriverContextConfig *ctx_config,
+ unsigned *error,
+ void *sharedContextPrivate);
/*======================================================================
* brw_misc_state.c
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 0ec504fd098..4e0abdb14df 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -72,9 +72,9 @@ brw_nir_lower_uniforms(nir_shader *nir, bool is_scalar)
}
}
-static struct gl_program *brwNewProgram(struct gl_context *ctx,
- gl_shader_stage stage,
- GLuint id, bool is_arb_asm);
+static struct gl_program *brw_new_program(struct gl_context *ctx,
+ gl_shader_stage stage,
+ GLuint id, bool is_arb_asm);
nir_shader *
brw_create_nir(struct brw_context *brw,
@@ -220,9 +220,10 @@ get_new_program_id(struct brw_screen *screen)
return p_atomic_inc_return(&screen->program_id);
}
-static struct gl_program *brwNewProgram(struct gl_context *ctx,
- gl_shader_stage stage,
- GLuint id, bool is_arb_asm)
+static struct gl_program *
+brw_new_program(struct gl_context *ctx,
+ gl_shader_stage stage,
+ GLuint id, bool is_arb_asm)
{
struct brw_context *brw = brw_context(ctx);
struct brw_program *prog = rzalloc(NULL, struct brw_program);
@@ -236,8 +237,8 @@ static struct gl_program *brwNewProgram(struct gl_context *ctx,
return NULL;
}
-static void brwDeleteProgram( struct gl_context *ctx,
- struct gl_program *prog )
+static void
+brw_delete_program(struct gl_context *ctx, struct gl_program *prog)
{
struct brw_context *brw = brw_context(ctx);
@@ -274,9 +275,9 @@ static void brwDeleteProgram( struct gl_context *ctx,
static GLboolean
-brwProgramStringNotify(struct gl_context *ctx,
- GLenum target,
- struct gl_program *prog)
+brw_program_string_notify(struct gl_context *ctx,
+ GLenum target,
+ struct gl_program *prog)
{
assert(target == GL_VERTEX_PROGRAM_ARB || !prog->arb.IsPositionInvariant);
@@ -534,9 +535,9 @@ brw_init_frag_prog_functions(struct dd_function_table *functions)
{
assert(functions->ProgramStringNotify == _tnl_program_string);
- functions->NewProgram = brwNewProgram;
- functions->DeleteProgram = brwDeleteProgram;
- functions->ProgramStringNotify = brwProgramStringNotify;
+ functions->NewProgram = brw_new_program;
+ functions->DeleteProgram = brw_delete_program;
+ functions->ProgramStringNotify = brw_program_string_notify;
functions->LinkShader = brw_link_shader;
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index f830187ed47..d3c72980c12 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -616,17 +616,17 @@ brw_miptree_copy(struct brw_context *brw,
}
bool
-intelEmitImmediateColorExpandBlit(struct brw_context *brw,
- GLuint cpp,
- GLubyte *src_bits, GLuint src_size,
- GLuint fg_color,
- GLshort dst_pitch,
- struct brw_bo *dst_buffer,
- GLuint dst_offset,
- enum isl_tiling dst_tiling,
- GLshort x, GLshort y,
- GLshort w, GLshort h,
- enum gl_logicop_mode logic_op)
+brw_emit_immediate_color_expand_blit(struct brw_context *brw,
+ GLuint cpp,
+ GLubyte *src_bits, GLuint src_size,
+ GLuint fg_color,
+ GLshort dst_pitch,
+ struct brw_bo *dst_buffer,
+ GLuint dst_offset,
+ enum isl_tiling dst_tiling,
+ GLshort x, GLshort y,
+ GLshort w, GLshort h,
+ enum gl_logicop_mode logic_op)
{
const struct gen_device_info *devinfo = &brw->screen->devinfo;
int dwords = ALIGN(src_size, 8) / 4;
diff --git a/src/mesa/drivers/dri/i965/intel_blit.h b/src/mesa/drivers/dri/i965/intel_blit.h
index 844bf0bb200..3eb50a0095c 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.h
+++ b/src/mesa/drivers/dri/i965/intel_blit.h
@@ -50,16 +50,16 @@ bool brw_miptree_copy(struct brw_context *brw,
uint32_t src_width, uint32_t src_height);
bool
-intelEmitImmediateColorExpandBlit(struct brw_context *brw,
- GLuint cpp,
- GLubyte *src_bits, GLuint src_size,
- GLuint fg_color,
- GLshort dst_pitch,
- struct brw_bo *dst_buffer,
- GLuint dst_offset,
- enum isl_tiling dst_tiling,
- GLshort x, GLshort y,
- GLshort w, GLshort h,
- enum gl_logicop_mode logic_op);
+brw_emit_immediate_color_expand_blit(struct brw_context *brw,
+ GLuint cpp,
+ GLubyte *src_bits, GLuint src_size,
+ GLuint fg_color,
+ GLshort dst_pitch,
+ struct brw_bo *dst_buffer,
+ GLuint dst_offset,
+ enum isl_tiling dst_tiling,
+ GLshort x, GLshort y,
+ GLshort w, GLshort h,
+ enum gl_logicop_mode logic_op);
#endif
diff --git a/src/mesa/drivers/dri/i965/intel_buffers.c b/src/mesa/drivers/dri/i965/intel_buffers.c
index b902d622623..9bdb3599942 100644
--- a/src/mesa/drivers/dri/i965/intel_buffers.c
+++ b/src/mesa/drivers/dri/i965/intel_buffers.c
@@ -33,7 +33,7 @@
#include "main/renderbuffer.h"
static void
-intelDrawBuffer(struct gl_context *ctx)
+brw_drawbuffer(struct gl_context *ctx)
{
if (_mesa_is_front_buffer_drawing(ctx->DrawBuffer)) {
struct brw_context *const brw = brw_context(ctx);
@@ -49,7 +49,7 @@ intelDrawBuffer(struct gl_context *ctx)
static void
-intelReadBuffer(struct gl_context * ctx, GLenum mode)
+brw_readbuffer(struct gl_context * ctx, GLenum mode)
{
if (_mesa_is_front_buffer_reading(ctx->ReadBuffer)) {
struct brw_context *const brw = brw_context(ctx);
@@ -67,6 +67,6 @@ intelReadBuffer(struct gl_context * ctx, GLenum mode)
void
brw_init_buffer_functions(struct dd_function_table *functions)
{
- functions->DrawBuffer = intelDrawBuffer;
- functions->ReadBuffer = intelReadBuffer;
+ functions->DrawBuffer = brw_drawbuffer;
+ functions->ReadBuffer = brw_readbuffer;
}
diff --git a/src/mesa/drivers/dri/i965/intel_pixel.c b/src/mesa/drivers/dri/i965/intel_pixel.c
index c7635cb71b6..31a18b21959 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel.c
@@ -126,9 +126,9 @@ brw_check_blit_fragment_ops(struct gl_context * ctx, bool src_alpha_is_one)
void
brw_init_pixel_functions(struct dd_function_table *functions)
{
- functions->Bitmap = intelBitmap;
- functions->CopyPixels = intelCopyPixels;
- functions->DrawPixels = intelDrawPixels;
- functions->ReadPixels = intelReadPixels;
+ functions->Bitmap = brw_bitmap;
+ functions->CopyPixels = brw_copypixels;
+ functions->DrawPixels = brw_drawpixels;
+ functions->ReadPixels = brw_readpixels;
}
diff --git a/src/mesa/drivers/dri/i965/intel_pixel.h b/src/mesa/drivers/dri/i965/intel_pixel.h
index df83af2cbe7..927a74d6e5f 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel.h
+++ b/src/mesa/drivers/dri/i965/intel_pixel.h
@@ -32,30 +32,30 @@ void brw_init_pixel_functions(struct dd_function_table *functions);
bool brw_check_blit_fragment_ops(struct gl_context *ctx,
bool src_alpha_is_one);
-void intelReadPixels(struct gl_context * ctx,
- GLint x, GLint y,
- GLsizei width, GLsizei height,
- GLenum format, GLenum type,
- const struct gl_pixelstore_attrib *pack,
- GLvoid * pixels);
-
-void intelDrawPixels(struct gl_context * ctx,
- GLint x, GLint y,
- GLsizei width, GLsizei height,
- GLenum format,
- GLenum type,
- const struct gl_pixelstore_attrib *unpack,
- const GLvoid * pixels);
-
-void intelCopyPixels(struct gl_context * ctx,
- GLint srcx, GLint srcy,
- GLsizei width, GLsizei height,
- GLint destx, GLint desty, GLenum type);
-
-void intelBitmap(struct gl_context * ctx,
- GLint x, GLint y,
- GLsizei width, GLsizei height,
- const struct gl_pixelstore_attrib *unpack,
- const GLubyte * pixels);
+void brw_readpixels(struct gl_context *ctx,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ const struct gl_pixelstore_attrib *pack,
+ GLvoid *pixels);
+
+void brw_drawpixels(struct gl_context *ctx,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLenum format,
+ GLenum type,
+ const struct gl_pixelstore_attrib *unpack,
+ const GLvoid *pixels);
+
+void brw_copypixels(struct gl_context *ctx,
+ GLint srcx, GLint srcy,
+ GLsizei width, GLsizei height,
+ GLint destx, GLint desty, GLenum type);
+
+void brw_bitmap(struct gl_context *ctx,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ const struct gl_pixelstore_attrib *unpack,
+ const GLubyte *pixels);
#endif
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
index 510a12d7b6d..f3525edca51 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
@@ -287,19 +287,19 @@ do_blit_bitmap( struct gl_context *ctx,
if (count == 0)
continue;
- if (!intelEmitImmediateColorExpandBlit(brw,
- irb->mt->cpp,
- (GLubyte *)stipple,
- sz,
- color,
- irb->mt->surf.row_pitch_B,
- irb->mt->bo,
- irb->mt->offset,
- irb->mt->surf.tiling,
- dstx + px,
- dsty + py,
- w, h,
- logic_op)) {
+ if (!brw_emit_immediate_color_expand_blit(brw,
+ irb->mt->cpp,
+ (GLubyte *)stipple,
+ sz,
+ color,
+ irb->mt->surf.row_pitch_B,
+ irb->mt->bo,
+ irb->mt->offset,
+ irb->mt->surf.tiling,
+ dstx + px,
+ dsty + py,
+ w, h,
+ logic_op)) {
return false;
}
@@ -342,11 +342,11 @@ out:
* - Chop bitmap up into 32x32 squares and render w/polygon stipple.
*/
void
-intelBitmap(struct gl_context * ctx,
- GLint x, GLint y,
- GLsizei width, GLsizei height,
- const struct gl_pixelstore_attrib *unpack,
- const GLubyte * pixels)
+brw_bitmap(struct gl_context * ctx,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ const struct gl_pixelstore_attrib *unpack,
+ const GLubyte * pixels)
{
struct brw_context *brw = brw_context(ctx);
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c
index cd4ac0569d9..6e81b0945b5 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c
@@ -191,10 +191,10 @@ out:
void
-intelCopyPixels(struct gl_context * ctx,
- GLint srcx, GLint srcy,
- GLsizei width, GLsizei height,
- GLint destx, GLint desty, GLenum type)
+brw_copypixels(struct gl_context *ctx,
+ GLint srcx, GLint srcy,
+ GLsizei width, GLsizei height,
+ GLint destx, GLint desty, GLenum type)
{
struct brw_context *brw = brw_context(ctx);
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_draw.c b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
index b02fe50db7a..e81fcafac80 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
@@ -144,13 +144,13 @@ do_blit_drawpixels(struct gl_context * ctx,
}
void
-intelDrawPixels(struct gl_context * ctx,
- GLint x, GLint y,
- GLsizei width, GLsizei height,
- GLenum format,
- GLenum type,
- const struct gl_pixelstore_attrib *unpack,
- const GLvoid * pixels)
+brw_drawpixels(struct gl_context *ctx,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLenum format,
+ GLenum type,
+ const struct gl_pixelstore_attrib *unpack,
+ const GLvoid *pixels)
{
struct brw_context *brw = brw_context(ctx);
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
index 5bd88555c00..67ddcae091c 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
@@ -253,10 +253,10 @@ brw_readpixels_blorp(struct gl_context *ctx,
}
void
-intelReadPixels(struct gl_context * ctx,
- GLint x, GLint y, GLsizei width, GLsizei height,
- GLenum format, GLenum type,
- const struct gl_pixelstore_attrib *pack, GLvoid * pixels)
+brw_readpixels(struct gl_context *ctx,
+ GLint x, GLint y, GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ const struct gl_pixelstore_attrib *pack, GLvoid *pixels)
{
bool ok;
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 4ed30124db3..87209e9afb1 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -141,9 +141,9 @@ get_time(void)
static const __DRItexBufferExtension intelTexBufferExtension = {
.base = { __DRI_TEX_BUFFER, 3 },
- .setTexBuffer = intelSetTexBuffer,
- .setTexBuffer2 = intelSetTexBuffer2,
- .releaseTexBuffer = intelReleaseTexBuffer,
+ .setTexBuffer = brw_set_texbuffer,
+ .setTexBuffer2 = brw_set_texbuffer2,
+ .releaseTexBuffer = brw_release_texbuffer,
};
static void
@@ -834,9 +834,9 @@ brw_create_image_common(__DRIscreen *dri_screen,
static __DRIimage *
brw_create_image(__DRIscreen *dri_screen,
- int width, int height, int format,
- unsigned int use,
- void *loaderPrivate)
+ int width, int height, int format,
+ unsigned int use,
+ void *loaderPrivate)
{
return brw_create_image_common(dri_screen, width, height, format, use,
NULL, 0, loaderPrivate);
@@ -1723,7 +1723,7 @@ brw_get_integer(struct brw_screen *screen, int param)
}
static void
-intelDestroyScreen(__DRIscreen * sPriv)
+brw_destroy_screen(__DRIscreen *sPriv)
{
struct brw_screen *screen = sPriv->driverPrivate;
@@ -1745,9 +1745,9 @@ intelDestroyScreen(__DRIscreen * sPriv)
* this does not allocate GPU memory.
*/
static GLboolean
-intelCreateBuffer(__DRIscreen *dri_screen,
- __DRIdrawable * driDrawPriv,
- const struct gl_config * mesaVis, GLboolean isPixmap)
+brw_create_buffer(__DRIscreen *dri_screen,
+ __DRIdrawable *driDrawPriv,
+ const struct gl_config *mesaVis, GLboolean isPixmap)
{
struct brw_renderbuffer *rb;
struct brw_screen *screen = (struct brw_screen *)
@@ -1813,7 +1813,7 @@ intelCreateBuffer(__DRIscreen *dri_screen,
/*
* Assert here that the gl_config has an expected depth/stencil bit
- * combination: one of d24/s8, d16/s0, d0/s0. (See intelInitScreen2(),
+ * combination: one of d24/s8, d16/s0, d0/s0. (See brw_init_screen(),
* which constructs the advertised configs.)
*/
if (mesaVis->depthBits == 24) {
@@ -1864,7 +1864,7 @@ intelCreateBuffer(__DRIscreen *dri_screen,
}
static void
-intelDestroyBuffer(__DRIdrawable * driDrawPriv)
+brw_destroy_buffer(__DRIdrawable *driDrawPriv)
{
struct gl_framebuffer *fb = driDrawPriv->driverPrivate;
@@ -2562,7 +2562,7 @@ shader_perf_log_mesa(void *data, const char *fmt, ...)
* \return the struct gl_config supported by this driver
*/
static const
-__DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)
+__DRIconfig **brw_init_screen(__DRIscreen *dri_screen)
{
struct brw_screen *screen;
@@ -2892,9 +2892,9 @@ struct brw_buffer {
};
static __DRIbuffer *
-intelAllocateBuffer(__DRIscreen *dri_screen,
- unsigned attachment, unsigned format,
- int width, int height)
+brw_allocate_buffer(__DRIscreen *dri_screen,
+ unsigned attachment, unsigned format,
+ int width, int height)
{
struct brw_screen *screen = dri_screen->driverPrivate;
@@ -2911,7 +2911,7 @@ intelAllocateBuffer(__DRIscreen *dri_screen,
uint32_t pitch;
int cpp = format / 8;
buffer->bo = brw_bo_alloc_tiled_2d(screen->bufmgr,
- "intelAllocateBuffer",
+ __func__,
width,
height,
cpp,
@@ -2934,7 +2934,7 @@ intelAllocateBuffer(__DRIscreen *dri_screen,
}
static void
-intelReleaseBuffer(UNUSED __DRIscreen *dri_screen, __DRIbuffer *_buffer)
+brw_release_buffer(UNUSED __DRIscreen *dri_screen, __DRIbuffer *_buffer)
{
struct brw_buffer *buffer = (struct brw_buffer *) _buffer;
@@ -2943,16 +2943,16 @@ intelReleaseBuffer(UNUSED __DRIscreen *dri_screen, __DRIbuffer *_buffer)
}
static const struct __DriverAPIRec brw_driver_api = {
- .InitScreen = intelInitScreen2,
- .DestroyScreen = intelDestroyScreen,
- .CreateContext = brwCreateContext,
- .DestroyContext = intelDestroyContext,
- .CreateBuffer = intelCreateBuffer,
- .DestroyBuffer = intelDestroyBuffer,
- .MakeCurrent = intelMakeCurrent,
- .UnbindContext = intelUnbindContext,
- .AllocateBuffer = intelAllocateBuffer,
- .ReleaseBuffer = intelReleaseBuffer
+ .InitScreen = brw_init_screen,
+ .DestroyScreen = brw_destroy_screen,
+ .CreateContext = brw_create_context,
+ .DestroyContext = brw_destroy_context,
+ .CreateBuffer = brw_create_buffer,
+ .DestroyBuffer = brw_destroy_buffer,
+ .MakeCurrent = brw_make_current,
+ .UnbindContext = brw_unbind_context,
+ .AllocateBuffer = brw_allocate_buffer,
+ .ReleaseBuffer = brw_release_buffer
};
static const struct __DRIDriverVtableExtensionRec brw_vtable = {
diff --git a/src/mesa/drivers/dri/i965/intel_screen.h b/src/mesa/drivers/dri/i965/intel_screen.h
index e9c6bb919b3..b6acd31e396 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.h
+++ b/src/mesa/drivers/dri/i965/intel_screen.h
@@ -125,17 +125,17 @@ struct brw_screen
struct disk_cache *disk_cache;
};
-extern void intelDestroyContext(__DRIcontext * driContextPriv);
+extern void brw_destroy_context(__DRIcontext *driContextPriv);
-extern GLboolean intelUnbindContext(__DRIcontext * driContextPriv);
+extern GLboolean brw_unbind_context(__DRIcontext *driContextPriv);
PUBLIC const __DRIextension **__driDriverGetExtensions_i965(void);
extern const __DRI2fenceExtension intelFenceExtension;
extern GLboolean
-intelMakeCurrent(__DRIcontext * driContextPriv,
- __DRIdrawable * driDrawPriv,
- __DRIdrawable * driReadPriv);
+brw_make_current(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv);
double get_time(void);
diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c
index 7d2f1651539..3c404ef56b5 100644
--- a/src/mesa/drivers/dri/i965/intel_tex.c
+++ b/src/mesa/drivers/dri/i965/intel_tex.c
@@ -15,7 +15,7 @@
#define FILE_DEBUG_FLAG DEBUG_TEXTURE
static struct gl_texture_image *
-intelNewTextureImage(struct gl_context * ctx)
+brw_new_texture_image(struct gl_context *ctx)
{
DBG("%s\n", __func__);
(void) ctx;
@@ -23,7 +23,7 @@ intelNewTextureImage(struct gl_context * ctx)
}
static void
-intelDeleteTextureImage(struct gl_context * ctx, struct gl_texture_image *img)
+brw_delete_texture_image(struct gl_context *ctx, struct gl_texture_image *img)
{
/* nothing special (yet) for brw_texture_image */
_mesa_delete_texture_image(ctx, img);
@@ -31,7 +31,7 @@ intelDeleteTextureImage(struct gl_context * ctx, struct gl_texture_image *img)
static struct gl_texture_object *
-intelNewTextureObject(struct gl_context * ctx, GLuint name, GLenum target)
+brw_new_texture_object(struct gl_context *ctx, GLuint name, GLenum target)
{
struct brw_texture_object *obj = CALLOC_STRUCT(brw_texture_object);
@@ -50,8 +50,8 @@ intelNewTextureObject(struct gl_context * ctx, GLuint name, GLenum target)
}
static void
-intelDeleteTextureObject(struct gl_context *ctx,
- struct gl_texture_object *texObj)
+brw_delete_texture_object(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
{
struct brw_texture_object *brw_obj = brw_texture_object(texObj);
@@ -325,10 +325,10 @@ brw_texture_barrier(struct gl_context *ctx)
void
brw_init_texture_functions(struct dd_function_table *functions)
{
- functions->NewTextureObject = intelNewTextureObject;
- functions->NewTextureImage = intelNewTextureImage;
- functions->DeleteTextureImage = intelDeleteTextureImage;
- functions->DeleteTexture = intelDeleteTextureObject;
+ functions->NewTextureObject = brw_new_texture_object;
+ functions->NewTextureImage = brw_new_texture_image;
+ functions->DeleteTextureImage = brw_delete_texture_image;
+ functions->DeleteTexture = brw_delete_texture_object;
functions->AllocTextureImageBuffer = brw_alloc_texture_image_buffer;
functions->FreeTextureImageBuffer = brw_free_texture_image_buffer;
functions->AllocTextureStorage = brw_alloc_texture_storage;
diff --git a/src/mesa/drivers/dri/i965/intel_tex.h b/src/mesa/drivers/dri/i965/intel_tex.h
index 92832bf933f..77ecbed97e8 100644
--- a/src/mesa/drivers/dri/i965/intel_tex.h
+++ b/src/mesa/drivers/dri/i965/intel_tex.h
@@ -39,11 +39,11 @@ void brw_init_texture_copy_image_functions(struct dd_function_table *functs);
void brw_init_copy_image_functions(struct dd_function_table *functions);
-void intelSetTexBuffer(__DRIcontext *pDRICtx,
- GLint target, __DRIdrawable *pDraw);
-void intelSetTexBuffer2(__DRIcontext *pDRICtx,
- GLint target, GLint format, __DRIdrawable *pDraw);
-void intelReleaseTexBuffer(__DRIcontext *pDRICtx, GLint target,
+void brw_set_texbuffer(__DRIcontext *pDRICtx,
+ GLint target, __DRIdrawable *pDraw);
+void brw_set_texbuffer2(__DRIcontext *pDRICtx,
+ GLint target, GLint format, __DRIdrawable *pDraw);
+void brw_release_texbuffer(__DRIcontext *pDRICtx, GLint target,
__DRIdrawable *dPriv);
struct brw_mipmap_tree *
diff --git a/src/mesa/drivers/dri/i965/intel_tex_copy.c b/src/mesa/drivers/dri/i965/intel_tex_copy.c
index e8ba004a9a8..8d5506a334f 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_copy.c
@@ -43,12 +43,12 @@
static void
-intelCopyTexSubImage(struct gl_context *ctx, GLuint dims,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint slice,
- struct gl_renderbuffer *rb,
- GLint x, GLint y,
- GLsizei width, GLsizei height)
+brw_copytexsubimage(struct gl_context *ctx, GLuint dims,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLint yoffset, GLint slice,
+ struct gl_renderbuffer *rb,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height)
{
struct brw_context *brw = brw_context(ctx);
@@ -68,5 +68,5 @@ intelCopyTexSubImage(struct gl_context *ctx, GLuint dims,
void
brw_init_texture_copy_image_functions(struct dd_function_table *functions)
{
- functions->CopyTexSubImage = intelCopyTexSubImage;
+ functions->CopyTexSubImage = brw_copytexsubimage;
}
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index c0fb6be14a7..dc262076472 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -353,11 +353,11 @@ brw_upload_tex(struct gl_context * ctx,
static void
-intelTexImage(struct gl_context * ctx,
- GLuint dims,
- struct gl_texture_image *texImage,
- GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *unpack)
+brw_teximage(struct gl_context * ctx,
+ GLuint dims,
+ struct gl_texture_image *texImage,
+ GLenum format, GLenum type, const void *pixels,
+ const struct gl_pixelstore_attrib *unpack)
{
DBG("%s mesa_format %s target %s format %s type %s level %d %dx%dx%d\n",
__func__, _mesa_get_format_name(texImage->TexFormat),
@@ -380,14 +380,14 @@ intelTexImage(struct gl_context * ctx,
static void
-intelTexSubImage(struct gl_context * ctx,
- GLuint dims,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type,
- const GLvoid * pixels,
- const struct gl_pixelstore_attrib *packing)
+brw_texsubimage(struct gl_context * ctx,
+ GLuint dims,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type,
+ const GLvoid * pixels,
+ const struct gl_pixelstore_attrib *packing)
{
DBG("%s mesa_format %s target %s format %s type %s level %d %dx%dx%d\n",
__func__, _mesa_get_format_name(texImage->TexFormat),
@@ -431,7 +431,7 @@ brw_set_texture_image_mt(struct brw_context *brw,
void
-intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
+brw_set_texbuffer2(__DRIcontext *pDRICtx, GLint target,
GLint texture_format,
__DRIdrawable *dPriv)
{
@@ -498,7 +498,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
}
void
-intelReleaseTexBuffer(__DRIcontext *pDRICtx, GLint target,
+brw_release_texbuffer(__DRIcontext *pDRICtx, GLint target,
__DRIdrawable *dPriv)
{
struct brw_context *brw = pDRICtx->driverPrivate;
@@ -519,7 +519,7 @@ intelReleaseTexBuffer(__DRIcontext *pDRICtx, GLint target,
}
/* The brw_miptree_prepare_external below as well as the finish_external
- * above in intelSetTexBuffer2 *should* do nothing. The BindTexImage call
+ * above in brw_set_texbuffer2 *should* do nothing. The BindTexImage call
* from both GLX and EGL has TexImage2D and not TexSubImage2D semantics so
* the texture is not immutable. This means that the user cannot create a
* texture view of the image with a different format. Since the only three
@@ -594,12 +594,12 @@ brw_bind_renderbuffer_tex_image(struct gl_context *ctx,
}
void
-intelSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
+brw_set_texbuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
{
/* The old interface didn't have the format argument, so copy our
* implementation's behavior at the time.
*/
- intelSetTexBuffer2(pDRICtx, target, __DRI_TEXTURE_FORMAT_RGBA, dPriv);
+ brw_set_texbuffer2(pDRICtx, target, __DRI_TEXTURE_FORMAT_RGBA, dPriv);
}
static void
@@ -952,12 +952,12 @@ flush_astc_denorms(struct gl_context *ctx, GLuint dims,
static void
-intelCompressedTexSubImage(struct gl_context *ctx, GLuint dims,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format,
- GLsizei imageSize, const GLvoid *data)
+brw_compressedtexsubimage(struct gl_context *ctx, GLuint dims,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format,
+ GLsizei imageSize, const GLvoid *data)
{
/* Upload the compressed data blocks */
_mesa_store_compressed_texsubimage(ctx, dims, texImage,
@@ -981,9 +981,9 @@ intelCompressedTexSubImage(struct gl_context *ctx, GLuint dims,
void
brw_init_texture_image_functions(struct dd_function_table *functions)
{
- functions->TexImage = intelTexImage;
- functions->TexSubImage = intelTexSubImage;
- functions->CompressedTexSubImage = intelCompressedTexSubImage;
+ functions->TexImage = brw_teximage;
+ functions->TexSubImage = brw_texsubimage;
+ functions->CompressedTexSubImage = brw_compressedtexsubimage;
functions->EGLImageTargetTexture2D = brw_image_target_texture_2d;
functions->EGLImageTargetTexStorage = brw_image_target_tex_storage;
functions->BindRenderbufferTexImage = brw_bind_renderbuffer_tex_image;
More information about the mesa-commit
mailing list