summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-04-09 11:09:42 +0100
committerJosé Fonseca <[email protected]>2009-04-09 15:22:15 +0100
commit19068d93c8f0f1d2b8809248266bf6da3dc6abd7 (patch)
treee960b3d9f4fbf7b897fa25abfeec0e14501bcde1 /src
parent7e563200b88edd50e0bbd00ada27f3988146ee9c (diff)
stw: Normalize symbols prefix.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_arbextensionsstring.h6
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c18
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.h6
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_context.c20
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_device.c2
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_framebuffer.c16
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_framebuffer.h11
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c18
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_pixelformat.c58
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_pixelformat.h24
10 files changed, 90 insertions, 89 deletions
diff --git a/src/gallium/state_trackers/wgl/shared/stw_arbextensionsstring.h b/src/gallium/state_trackers/wgl/shared/stw_arbextensionsstring.h
index a0e4c5d98e8..41421a0d3ab 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_arbextensionsstring.h
+++ b/src/gallium/state_trackers/wgl/shared/stw_arbextensionsstring.h
@@ -25,11 +25,11 @@
*
**************************************************************************/
-#ifndef WGL_ARBEXTENSIONSSTRING_H
-#define WGL_ARBEXTENSIONSSTRING_H
+#ifndef STW_ARBEXTENSIONSSTRING_H
+#define STW_ARBEXTENSIONSSTRING_H
WINGDIAPI const char * APIENTRY
wglGetExtensionsStringARB(
HDC hdc );
-#endif /* WGL_ARBEXTENSIONSSTRING_H */
+#endif /* STW_ARBEXTENSIONSSTRING_H */
diff --git a/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c b/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c
index ead2c8aa59c..6030cb1ef24 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c
@@ -101,9 +101,9 @@ query_attrib(
{
uint count;
uint index;
- const struct pixelformat_info *pf;
+ const struct stw_pixelformat_info *pf;
- count = pixelformat_get_extended_count();
+ count = stw_pixelformat_get_extended_count();
if (attrib == WGL_NUMBER_PIXEL_FORMATS_ARB) {
*pvalue = (int) count;
@@ -114,7 +114,7 @@ query_attrib(
if (index >= count)
return FALSE;
- pf = pixelformat_get_info( index );
+ pf = stw_pixelformat_get_info( index );
switch (attrib) {
case WGL_DRAW_TO_WINDOW_ARB:
@@ -324,7 +324,7 @@ static const struct attrib_match_info attrib_match[] = {
{ WGL_SAMPLES_ARB, 2, FALSE }
};
-struct pixelformat_score
+struct stw_pixelformat_score
{
int points;
uint index;
@@ -332,7 +332,7 @@ struct pixelformat_score
static BOOL
score_pixelformats(
- struct pixelformat_score *scores,
+ struct stw_pixelformat_score *scores,
uint count,
int attribute,
int expected_value )
@@ -395,7 +395,7 @@ wglChoosePixelFormatARB(
UINT *nNumFormats )
{
uint count;
- struct pixelformat_score *scores;
+ struct stw_pixelformat_score *scores;
uint i;
*nNumFormats = 0;
@@ -405,8 +405,8 @@ wglChoosePixelFormatARB(
* points for a mismatch when the match does not have to be exact.
* Set a score to 0 if there is a mismatch for an exact match criteria.
*/
- count = pixelformat_get_extended_count();
- scores = (struct pixelformat_score *) MALLOC( count * sizeof( struct pixelformat_score ) );
+ count = stw_pixelformat_get_extended_count();
+ scores = (struct stw_pixelformat_score *) MALLOC( count * sizeof( struct stw_pixelformat_score ) );
if (scores == NULL)
return FALSE;
for (i = 0; i < count; i++) {
@@ -446,7 +446,7 @@ wglChoosePixelFormatARB(
swapped = FALSE;
for (i = 1; i < n; i++) {
if (scores[i - 1].points < scores[i].points) {
- struct pixelformat_score score = scores[i - 1];
+ struct stw_pixelformat_score score = scores[i - 1];
scores[i - 1] = scores[i];
scores[i] = score;
diff --git a/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.h b/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.h
index a6c42599424..36847d2ca91 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.h
+++ b/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.h
@@ -25,8 +25,8 @@
*
**************************************************************************/
-#ifndef WGL_ARBPIXELFORMAT_H
-#define WGL_ARBPIXELFORMAT_H
+#ifndef STW_ARBPIXELFORMAT_H
+#define STW_ARBPIXELFORMAT_H
/* Extension functions for get_proc_address:
@@ -58,4 +58,4 @@ wglGetPixelFormatAttribivARB(
const int *piAttributes,
int *piValues );
-#endif /* WGL_ARBPIXELFORMAT_H */
+#endif /* STW_ARBPIXELFORMAT_H */
diff --git a/src/gallium/state_trackers/wgl/shared/stw_context.c b/src/gallium/state_trackers/wgl/shared/stw_context.c
index f890225242a..5c9f7c8971a 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_context.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_context.c
@@ -80,7 +80,7 @@ stw_create_layer_context(
int iLayerPlane )
{
uint pfi;
- const struct pixelformat_info *pf = NULL;
+ const struct stw_pixelformat_info *pf = NULL;
struct stw_context *ctx = NULL;
GLvisual *visual = NULL;
struct pipe_screen *screen = NULL;
@@ -97,7 +97,7 @@ stw_create_layer_context(
if (pfi == 0)
return 0;
- pf = pixelformat_get_info( pfi - 1 );
+ pf = stw_pixelformat_get_info( pfi - 1 );
ctx = CALLOC_STRUCT( stw_context );
if (ctx == NULL)
@@ -199,9 +199,9 @@ stw_delete_context(
if (glcurctx == glctx)
st_make_current( NULL, NULL, NULL );
- fb = framebuffer_from_hdc( ctx->hdc );
+ fb = stw_framebuffer_from_hdc( ctx->hdc );
if (fb)
- framebuffer_destroy( fb );
+ stw_framebuffer_destroy( fb );
if (WindowFromDC( ctx->hdc ) != NULL)
ReleaseDC( WindowFromDC( ctx->hdc ), ctx->hdc );
@@ -257,7 +257,7 @@ done:
/* Find the width and height of the window named by hdc.
*/
static void
-get_window_size( HDC hdc, GLuint *width, GLuint *height )
+stw_get_window_size( HDC hdc, GLuint *width, GLuint *height )
{
if (WindowFromDC( hdc )) {
RECT rect;
@@ -325,24 +325,24 @@ stw_make_current(
return TRUE;
}
- fb = framebuffer_from_hdc( hdc );
+ fb = stw_framebuffer_from_hdc( hdc );
if (hdc != NULL)
- get_window_size( hdc, &width, &height );
+ stw_get_window_size( hdc, &width, &height );
- /* Lazy creation of framebuffers.
+ /* Lazy creation of stw_framebuffers.
*/
if (fb == NULL && ctx != NULL && hdc != NULL) {
GLvisual *visual = &ctx->st->ctx->Visual;
- fb = framebuffer_create( hdc, visual, width, height );
+ fb = stw_framebuffer_create( hdc, visual, width, height );
if (fb == NULL)
return FALSE;
}
if (ctx && fb) {
st_make_current( ctx->st, fb->stfb, fb->stfb );
- framebuffer_resize( fb, width, height );
+ stw_framebuffer_resize( fb, width, height );
ctx->hdc = hdc;
ctx->st->pipe->priv = hdc;
}
diff --git a/src/gallium/state_trackers/wgl/shared/stw_device.c b/src/gallium/state_trackers/wgl/shared/stw_device.c
index 51936c2bdd6..78d3ac83135 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_device.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_device.c
@@ -119,7 +119,7 @@ st_init(const struct stw_winsys *stw_winsys)
goto error1;
}
- pixelformat_init();
+ stw_pixelformat_init();
return TRUE;
diff --git a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c
index c96c4b8dfa8..a1202ab14d6 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c
@@ -45,7 +45,7 @@
void
-framebuffer_resize(
+stw_framebuffer_resize(
struct stw_framebuffer *fb,
GLuint width,
GLuint height )
@@ -56,7 +56,7 @@ framebuffer_resize(
static struct stw_framebuffer *fb_head = NULL;
static LRESULT CALLBACK
-window_proc(
+stw_window_proc(
HWND hWnd,
UINT uMsg,
WPARAM wParam,
@@ -70,7 +70,7 @@ window_proc(
assert( fb != NULL );
if (uMsg == WM_SIZE && wParam != SIZE_MINIMIZED)
- framebuffer_resize( fb, LOWORD( lParam ), HIWORD( lParam ) );
+ stw_framebuffer_resize( fb, LOWORD( lParam ), HIWORD( lParam ) );
return CallWindowProc( fb->WndProc, hWnd, uMsg, wParam, lParam );
}
@@ -94,7 +94,7 @@ stw_is_supported_depth_stencil(enum pipe_format format)
/* Create a new framebuffer object which will correspond to the given HDC.
*/
struct stw_framebuffer *
-framebuffer_create(
+stw_framebuffer_create(
HDC hdc,
GLvisual *visual,
GLuint width,
@@ -198,7 +198,7 @@ framebuffer_create(
fb->WndProc = (WNDPROC) SetWindowLongPtr(
fb->hWnd,
GWLP_WNDPROC,
- (LONG_PTR) window_proc );
+ (LONG_PTR) stw_window_proc );
}
fb->next = fb_head;
@@ -207,7 +207,7 @@ framebuffer_create(
}
void
-framebuffer_destroy(
+stw_framebuffer_destroy(
struct stw_framebuffer *fb )
{
struct stw_framebuffer **link = &fb_head;
@@ -235,7 +235,7 @@ framebuffer_destroy(
/* Given an hdc, return the corresponding stw_framebuffer.
*/
struct stw_framebuffer *
-framebuffer_from_hdc(
+stw_framebuffer_from_hdc(
HDC hdc )
{
struct stw_framebuffer *fb;
@@ -255,7 +255,7 @@ stw_swap_buffers(
struct pipe_screen *screen;
struct pipe_surface *surface;
- fb = framebuffer_from_hdc( hdc );
+ fb = stw_framebuffer_from_hdc( hdc );
if (fb == NULL)
return FALSE;
diff --git a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.h b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.h
index 5abdf189970..c2822f6d6de 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.h
+++ b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.h
@@ -30,7 +30,8 @@
#include "main/mtypes.h"
-/* Windows framebuffer, derived from gl_framebuffer.
+/**
+ * Windows framebuffer, derived from gl_framebuffer.
*/
struct stw_framebuffer
{
@@ -43,24 +44,24 @@ struct stw_framebuffer
};
struct stw_framebuffer *
-framebuffer_create(
+stw_framebuffer_create(
HDC hdc,
GLvisual *visual,
GLuint width,
GLuint height );
void
-framebuffer_destroy(
+stw_framebuffer_destroy(
struct stw_framebuffer *fb );
void
-framebuffer_resize(
+stw_framebuffer_resize(
struct stw_framebuffer *fb,
GLuint width,
GLuint height );
struct stw_framebuffer *
-framebuffer_from_hdc(
+stw_framebuffer_from_hdc(
HDC hdc );
#endif /* STW_FRAMEBUFFER_H */
diff --git a/src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c b/src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c
index f15b950bf08..9131dd77e7a 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c
@@ -32,23 +32,23 @@
#include "stw_arbpixelformat.h"
#include "stw_public.h"
-struct extension_entry
+struct stw_extension_entry
{
const char *name;
PROC proc;
};
-#define EXTENTRY(P) { #P, (PROC) P }
+#define STW_EXTENSION_ENTRY(P) { #P, (PROC) P }
-static const struct extension_entry extension_entries[] = {
+static const struct stw_extension_entry stw_extension_entries[] = {
/* WGL_ARB_extensions_string */
- EXTENTRY( wglGetExtensionsStringARB ),
+ STW_EXTENSION_ENTRY( wglGetExtensionsStringARB ),
/* WGL_ARB_pixel_format */
- EXTENTRY( wglChoosePixelFormatARB ),
- EXTENTRY( wglGetPixelFormatAttribfvARB ),
- EXTENTRY( wglGetPixelFormatAttribivARB ),
+ STW_EXTENSION_ENTRY( wglChoosePixelFormatARB ),
+ STW_EXTENSION_ENTRY( wglGetPixelFormatAttribfvARB ),
+ STW_EXTENSION_ENTRY( wglGetPixelFormatAttribivARB ),
{ NULL, NULL }
};
@@ -57,13 +57,13 @@ PROC
stw_get_proc_address(
LPCSTR lpszProc )
{
- const struct extension_entry *entry;
+ const struct stw_extension_entry *entry;
PROC p = (PROC) _glapi_get_proc_address( lpszProc );
if (p)
return p;
- for (entry = extension_entries; entry->name; entry++)
+ for (entry = stw_extension_entries; entry->name; entry++)
if (strcmp( lpszProc, entry->name ) == 0)
return entry->proc;
diff --git a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c
index b216ca5c823..a7e8363d59f 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c
@@ -30,24 +30,24 @@
#include "stw_public.h"
#include "stw_tls.h"
-#define MAX_PIXELFORMATS 16
+#define STW_MAX_PIXELFORMATS 16
-static struct pixelformat_info pixelformats[MAX_PIXELFORMATS];
-static uint pixelformat_count = 0;
-static uint pixelformat_extended_count = 0;
+static struct stw_pixelformat_info pixelformats[STW_MAX_PIXELFORMATS];
+static uint stw_pixelformat_count = 0;
+static uint stw_pixelformat_extended_count = 0;
static void
add_standard_pixelformats(
- struct pixelformat_info **ppf,
+ struct stw_pixelformat_info **ppf,
uint flags )
{
- struct pixelformat_info *pf = *ppf;
- struct pixelformat_color_info color24 = { 8, 0, 8, 8, 8, 16 };
- struct pixelformat_alpha_info alpha8 = { 8, 24 };
- struct pixelformat_alpha_info noalpha = { 0, 0 };
- struct pixelformat_depth_info depth24s8 = { 24, 8 };
- struct pixelformat_depth_info depth16 = { 16, 0 };
+ struct stw_pixelformat_info *pf = *ppf;
+ struct stw_pixelformat_color_info color24 = { 8, 0, 8, 8, 8, 16 };
+ struct stw_pixelformat_alpha_info alpha8 = { 8, 24 };
+ struct stw_pixelformat_alpha_info noalpha = { 0, 0 };
+ struct stw_pixelformat_depth_info depth24s8 = { 24, 8 };
+ struct stw_pixelformat_depth_info depth16 = { 16, 0 };
pf->flags = PF_FLAG_DOUBLEBUFFER | flags;
pf->color = color24;
@@ -101,35 +101,35 @@ add_standard_pixelformats(
}
void
-pixelformat_init( void )
+stw_pixelformat_init( void )
{
- struct pixelformat_info *pf = pixelformats;
+ struct stw_pixelformat_info *pf = pixelformats;
add_standard_pixelformats( &pf, 0 );
- pixelformat_count = pf - pixelformats;
+ stw_pixelformat_count = pf - pixelformats;
add_standard_pixelformats( &pf, PF_FLAG_MULTISAMPLED );
- pixelformat_extended_count = pf - pixelformats;
+ stw_pixelformat_extended_count = pf - pixelformats;
- assert( pixelformat_extended_count <= MAX_PIXELFORMATS );
+ assert( stw_pixelformat_extended_count <= STW_MAX_PIXELFORMATS );
}
uint
-pixelformat_get_count( void )
+stw_pixelformat_get_count( void )
{
- return pixelformat_count;
+ return stw_pixelformat_count;
}
uint
-pixelformat_get_extended_count( void )
+stw_pixelformat_get_extended_count( void )
{
- return pixelformat_extended_count;
+ return stw_pixelformat_extended_count;
}
-const struct pixelformat_info *
-pixelformat_get_info( uint index )
+const struct stw_pixelformat_info *
+stw_pixelformat_get_info( uint index )
{
- assert( index < pixelformat_extended_count );
+ assert( index < stw_pixelformat_extended_count );
return &pixelformats[index];
}
@@ -144,11 +144,11 @@ stw_pixelformat_describe(
{
uint count;
uint index;
- const struct pixelformat_info *pf;
+ const struct stw_pixelformat_info *pf;
(void) hdc;
- count = pixelformat_get_extended_count();
+ count = stw_pixelformat_get_extended_count();
index = (uint) iPixelFormat - 1;
if (ppfd == NULL)
@@ -156,7 +156,7 @@ stw_pixelformat_describe(
if (index >= count || nBytes != sizeof( PIXELFORMATDESCRIPTOR ))
return 0;
- pf = pixelformat_get_info( index );
+ pf = stw_pixelformat_get_info( index );
ppfd->nSize = sizeof( PIXELFORMATDESCRIPTOR );
ppfd->nVersion = 1;
@@ -203,13 +203,13 @@ int stw_pixelformat_choose( HDC hdc,
(void) hdc;
- count = pixelformat_get_count();
+ count = stw_pixelformat_get_count();
bestindex = count;
bestdelta = 0xffffffff;
for (index = 0; index < count; index++) {
uint delta = 0;
- const struct pixelformat_info *pf = pixelformat_get_info( index );
+ const struct stw_pixelformat_info *pf = stw_pixelformat_get_info( index );
if (!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) &&
!!(ppfd->dwFlags & PFD_DOUBLEBUFFER) !=
@@ -262,7 +262,7 @@ stw_pixelformat_set(
(void) hdc;
index = (uint) iPixelFormat - 1;
- count = pixelformat_get_extended_count();
+ count = stw_pixelformat_get_extended_count();
if (index >= count)
return FALSE;
diff --git a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.h b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.h
index 7ca4194a2ae..926c9c9aab5 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.h
+++ b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.h
@@ -34,7 +34,7 @@
#define PF_FLAG_DOUBLEBUFFER 0x00000001
#define PF_FLAG_MULTISAMPLED 0x00000002
-struct pixelformat_color_info
+struct stw_pixelformat_color_info
{
uint redbits;
uint redshift;
@@ -44,37 +44,37 @@ struct pixelformat_color_info
uint blueshift;
};
-struct pixelformat_alpha_info
+struct stw_pixelformat_alpha_info
{
uint alphabits;
uint alphashift;
};
-struct pixelformat_depth_info
+struct stw_pixelformat_depth_info
{
uint depthbits;
uint stencilbits;
};
-struct pixelformat_info
+struct stw_pixelformat_info
{
uint flags;
- struct pixelformat_color_info color;
- struct pixelformat_alpha_info alpha;
- struct pixelformat_depth_info depth;
+ struct stw_pixelformat_color_info color;
+ struct stw_pixelformat_alpha_info alpha;
+ struct stw_pixelformat_depth_info depth;
};
void
-pixelformat_init( void );
+stw_pixelformat_init( void );
uint
-pixelformat_get_count( void );
+stw_pixelformat_get_count( void );
uint
-pixelformat_get_extended_count( void );
+stw_pixelformat_get_extended_count( void );
-const struct pixelformat_info *
-pixelformat_get_info( uint index );
+const struct stw_pixelformat_info *
+stw_pixelformat_get_info( uint index );
int stw_query_sample_buffers( void );
int stw_query_samples( void );