brw_winsys.h File Reference

This is the interface that i965simple requires any window system hosting it to implement. More...

Include dependency graph for brw_winsys.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  brw_winsys
 Additional winsys interface for i965simple. More...

Defines

#define PCI_CHIP_I965_G   0x29A2
#define PCI_CHIP_I965_Q   0x2992
#define PCI_CHIP_I965_G_1   0x2982
#define PCI_CHIP_I965_GM   0x2A02
#define PCI_CHIP_I965_GME   0x2A12
#define BRW_CONSTANT_BUFFER   BRW_MAX_CACHE
#define BRW_BUFFER_ACCESS_WRITE   0x1
#define BRW_BUFFER_ACCESS_READ   0x2
#define BRW_BUFFER_USAGE_LIT_VERTEX   (PIPE_BUFFER_USAGE_CUSTOM << 0)

Enumerations

enum  brw_cache_id {
  BRW_CC_VP, BRW_CC_UNIT, BRW_WM_PROG, BRW_SAMPLER_DEFAULT_COLOR,
  BRW_SAMPLER, BRW_WM_UNIT, BRW_SF_PROG, BRW_SF_VP,
  BRW_SF_UNIT, BRW_VS_UNIT, BRW_VS_PROG, BRW_GS_UNIT,
  BRW_GS_PROG, BRW_CLIP_VP, BRW_CLIP_UNIT, BRW_CLIP_PROG,
  BRW_SS_SURFACE, BRW_SS_SURF_BIND, BRW_MAX_CACHE
}

Functions

struct pipe_contextbrw_create (struct pipe_screen *, struct brw_winsys *, unsigned pci_id)
static boolean brw_batchbuffer_data (struct brw_winsys *winsys, const void *data, unsigned bytes)


Detailed Description

This is the interface that i965simple requires any window system hosting it to implement.

This is the only include file in i965simple which is public.

Definition in file brw_winsys.h.


Define Documentation

#define BRW_BUFFER_ACCESS_READ   0x2

Definition at line 183 of file brw_winsys.h.

#define BRW_BUFFER_ACCESS_WRITE   0x1

Definition at line 182 of file brw_winsys.h.

#define BRW_BUFFER_USAGE_LIT_VERTEX   (PIPE_BUFFER_USAGE_CUSTOM << 0)

Definition at line 185 of file brw_winsys.h.

#define BRW_CONSTANT_BUFFER   BRW_MAX_CACHE

Definition at line 100 of file brw_winsys.h.

#define PCI_CHIP_I965_G   0x29A2

Definition at line 61 of file brw_winsys.h.

#define PCI_CHIP_I965_G_1   0x2982

Definition at line 63 of file brw_winsys.h.

#define PCI_CHIP_I965_GM   0x2A02

Definition at line 64 of file brw_winsys.h.

#define PCI_CHIP_I965_GME   0x2A12

Definition at line 65 of file brw_winsys.h.

#define PCI_CHIP_I965_Q   0x2992

Definition at line 62 of file brw_winsys.h.


Enumeration Type Documentation

enum brw_cache_id

Enumerator:
BRW_CC_VP 
BRW_CC_UNIT 
BRW_WM_PROG 
BRW_SAMPLER_DEFAULT_COLOR 
BRW_SAMPLER 
BRW_WM_UNIT 
BRW_SF_PROG 
BRW_SF_VP 
BRW_SF_UNIT 
BRW_VS_UNIT 
BRW_VS_PROG 
BRW_GS_UNIT 
BRW_GS_PROG 
BRW_CLIP_VP 
BRW_CLIP_UNIT 
BRW_CLIP_PROG 
BRW_SS_SURFACE 
BRW_SS_SURF_BIND 
BRW_MAX_CACHE 

Definition at line 77 of file brw_winsys.h.

00077                   {
00078    BRW_CC_VP,
00079    BRW_CC_UNIT,
00080    BRW_WM_PROG,
00081    BRW_SAMPLER_DEFAULT_COLOR,
00082    BRW_SAMPLER,
00083    BRW_WM_UNIT,
00084    BRW_SF_PROG,
00085    BRW_SF_VP,
00086    BRW_SF_UNIT,
00087    BRW_VS_UNIT,
00088    BRW_VS_PROG,
00089    BRW_GS_UNIT,
00090    BRW_GS_PROG,
00091    BRW_CLIP_VP,
00092    BRW_CLIP_UNIT,
00093    BRW_CLIP_PROG,
00094    BRW_SS_SURFACE,
00095    BRW_SS_SURF_BIND,
00096 
00097    BRW_MAX_CACHE
00098 };


Function Documentation

static boolean brw_batchbuffer_data ( struct brw_winsys winsys,
const void *  data,
unsigned  bytes 
) [static]

Definition at line 192 of file brw_winsys.h.

References brw_winsys::batch_dword, brw_winsys::batch_end, and brw_winsys::batch_start.

00195 {
00196    static const unsigned incr = sizeof(unsigned);
00197    uint i;
00198    const unsigned *udata = (const unsigned*)(data);
00199    unsigned size = bytes/incr;
00200 
00201    winsys->batch_start(winsys, size, 0);
00202    for (i = 0; i < size; ++i) {
00203       winsys->batch_dword(winsys, udata[i]);
00204    }
00205    winsys->batch_end(winsys);
00206 
00207    return (i == size);
00208 }

struct pipe_context* brw_create ( struct pipe_screen ,
struct brw_winsys ,
unsigned  pci_id 
) [read]

Definition at line 77 of file brw_context.c.

References brw_context::bind, brw_clear(), brw_destroy(), brw_init_draw_functions(), brw_init_flush_functions(), brw_init_state(), brw_init_state_functions(), brw_init_surface_functions(), brw_init_texture_functions(), CALLOC_STRUCT, pipe_context::clear, debug_printf(), pipe_context::destroy, brw_context::dirty, brw_context::hardware_dirty, brw_context::pci_id, brw_context::pipe, pipe_context::screen, pipe_screen::winsys, pipe_context::winsys, brw_context::winsys, and brw_context::wm.

00080 {
00081    struct brw_context *brw;
00082 
00083    debug_printf("%s: creating brw_context with pci id 0x%x\n",
00084                 __FUNCTION__, pci_id);
00085 
00086    brw = CALLOC_STRUCT(brw_context);
00087    if (brw == NULL)
00088       return NULL;
00089 
00090    brw->winsys = brw_winsys;
00091    brw->pipe.winsys = screen->winsys;
00092    brw->pipe.screen = screen;
00093 
00094    brw->pipe.destroy = brw_destroy;
00095    brw->pipe.clear = brw_clear;
00096 
00097    brw_init_surface_functions(brw);
00098    brw_init_texture_functions(brw);
00099    brw_init_state_functions(brw);
00100    brw_init_flush_functions(brw);
00101    brw_init_draw_functions( brw );
00102 
00103 
00104    brw_init_state( brw );
00105 
00106    brw->pci_id = pci_id;
00107    brw->dirty = ~0;
00108    brw->hardware_dirty = ~0;
00109 
00110    memset(&brw->wm.bind, ~0, sizeof(brw->wm.bind));
00111 
00112    return &brw->pipe;
00113 }


Generated on Tue Sep 29 06:25:39 2009 for Gallium3D by  doxygen 1.5.4