fo_context.h File Reference

Include dependency graph for fo_context.h:

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

Go to the source code of this file.

Data Structures

struct  fo_state
struct  failover_context

Defines

#define FO_NEW_VIEWPORT   0x1
#define FO_NEW_RASTERIZER   0x2
#define FO_NEW_FRAGMENT_SHADER   0x4
#define FO_NEW_BLEND   0x8
#define FO_NEW_CLIP   0x10
#define FO_NEW_SCISSOR   0x20
#define FO_NEW_STIPPLE   0x40
#define FO_NEW_FRAMEBUFFER   0x80
#define FO_NEW_ALPHA_TEST   0x100
#define FO_NEW_DEPTH_STENCIL   0x200
#define FO_NEW_SAMPLER   0x400
#define FO_NEW_TEXTURE   0x800
#define FO_NEW_VERTEX   0x2000
#define FO_NEW_VERTEX_SHADER   0x4000
#define FO_NEW_BLEND_COLOR   0x8000
#define FO_NEW_CLEAR_COLOR   0x10000
#define FO_NEW_VERTEX_BUFFER   0x20000
#define FO_NEW_VERTEX_ELEMENT   0x40000
#define FO_HW   0
#define FO_SW   1

Functions

void failover_init_state_functions (struct failover_context *failover)
void failover_state_emit (struct failover_context *failover)
static struct failover_contextfailover_context (struct pipe_context *pipe)


Define Documentation

#define FO_HW   0

Definition at line 60 of file fo_context.h.

#define FO_NEW_ALPHA_TEST   0x100

Definition at line 47 of file fo_context.h.

#define FO_NEW_BLEND   0x8

Definition at line 42 of file fo_context.h.

#define FO_NEW_BLEND_COLOR   0x8000

Definition at line 53 of file fo_context.h.

#define FO_NEW_CLEAR_COLOR   0x10000

Definition at line 54 of file fo_context.h.

#define FO_NEW_CLIP   0x10

Definition at line 43 of file fo_context.h.

#define FO_NEW_DEPTH_STENCIL   0x200

Definition at line 48 of file fo_context.h.

#define FO_NEW_FRAGMENT_SHADER   0x4

Definition at line 41 of file fo_context.h.

#define FO_NEW_FRAMEBUFFER   0x80

Definition at line 46 of file fo_context.h.

#define FO_NEW_RASTERIZER   0x2

Definition at line 40 of file fo_context.h.

#define FO_NEW_SAMPLER   0x400

Definition at line 49 of file fo_context.h.

#define FO_NEW_SCISSOR   0x20

Definition at line 44 of file fo_context.h.

#define FO_NEW_STIPPLE   0x40

Definition at line 45 of file fo_context.h.

#define FO_NEW_TEXTURE   0x800

Definition at line 50 of file fo_context.h.

#define FO_NEW_VERTEX   0x2000

Definition at line 51 of file fo_context.h.

#define FO_NEW_VERTEX_BUFFER   0x20000

Definition at line 55 of file fo_context.h.

#define FO_NEW_VERTEX_ELEMENT   0x40000

Definition at line 56 of file fo_context.h.

#define FO_NEW_VERTEX_SHADER   0x4000

Definition at line 52 of file fo_context.h.

#define FO_NEW_VIEWPORT   0x1

Definition at line 39 of file fo_context.h.

#define FO_SW   1

Definition at line 61 of file fo_context.h.


Function Documentation

static struct failover_context* failover_context ( struct pipe_context pipe  )  [static, read]

Definition at line 112 of file fo_context.h.

00113 {
00114    return (struct failover_context *)pipe;
00115 }

void failover_init_state_functions ( struct failover_context failover  ) 

Definition at line 452 of file fo_state.c.

References pipe_context::bind_blend_state, pipe_context::bind_depth_stencil_alpha_state, pipe_context::bind_fs_state, pipe_context::bind_rasterizer_state, pipe_context::bind_sampler_states, pipe_context::bind_vs_state, pipe_context::create_blend_state, pipe_context::create_depth_stencil_alpha_state, pipe_context::create_fs_state, pipe_context::create_rasterizer_state, pipe_context::create_sampler_state, pipe_context::create_vs_state, pipe_context::delete_blend_state, pipe_context::delete_depth_stencil_alpha_state, pipe_context::delete_fs_state, pipe_context::delete_rasterizer_state, pipe_context::delete_sampler_state, pipe_context::delete_vs_state, failover_bind_blend_state(), failover_bind_depth_stencil_state(), failover_bind_fs_state(), failover_bind_rasterizer_state(), failover_bind_sampler_states(), failover_bind_vs_state(), failover_create_blend_state(), failover_create_depth_stencil_state(), failover_create_fs_state(), failover_create_rasterizer_state(), failover_create_sampler_state(), failover_create_vs_state(), failover_delete_blend_state(), failover_delete_depth_stencil_state(), failover_delete_fs_state(), failover_delete_rasterizer_state(), failover_delete_sampler_state(), failover_delete_vs_state(), failover_set_blend_color(), failover_set_clip_state(), failover_set_constant_buffer(), failover_set_framebuffer_state(), failover_set_polygon_stipple(), failover_set_sampler_textures(), failover_set_scissor_state(), failover_set_vertex_buffers(), failover_set_vertex_elements(), failover_set_viewport_state(), failover_context::pipe, pipe_context::set_blend_color, pipe_context::set_clip_state, pipe_context::set_constant_buffer, pipe_context::set_framebuffer_state, pipe_context::set_polygon_stipple, pipe_context::set_sampler_textures, pipe_context::set_scissor_state, pipe_context::set_vertex_buffers, pipe_context::set_vertex_elements, and pipe_context::set_viewport_state.

00453 {
00454    failover->pipe.create_blend_state = failover_create_blend_state;
00455    failover->pipe.bind_blend_state   = failover_bind_blend_state;
00456    failover->pipe.delete_blend_state = failover_delete_blend_state;
00457    failover->pipe.create_sampler_state = failover_create_sampler_state;
00458    failover->pipe.bind_sampler_states  = failover_bind_sampler_states;
00459    failover->pipe.delete_sampler_state = failover_delete_sampler_state;
00460    failover->pipe.create_depth_stencil_alpha_state = failover_create_depth_stencil_state;
00461    failover->pipe.bind_depth_stencil_alpha_state   = failover_bind_depth_stencil_state;
00462    failover->pipe.delete_depth_stencil_alpha_state = failover_delete_depth_stencil_state;
00463    failover->pipe.create_rasterizer_state = failover_create_rasterizer_state;
00464    failover->pipe.bind_rasterizer_state = failover_bind_rasterizer_state;
00465    failover->pipe.delete_rasterizer_state = failover_delete_rasterizer_state;
00466    failover->pipe.create_fs_state = failover_create_fs_state;
00467    failover->pipe.bind_fs_state   = failover_bind_fs_state;
00468    failover->pipe.delete_fs_state = failover_delete_fs_state;
00469    failover->pipe.create_vs_state = failover_create_vs_state;
00470    failover->pipe.bind_vs_state   = failover_bind_vs_state;
00471    failover->pipe.delete_vs_state = failover_delete_vs_state;
00472 
00473    failover->pipe.set_blend_color = failover_set_blend_color;
00474    failover->pipe.set_clip_state = failover_set_clip_state;
00475    failover->pipe.set_framebuffer_state = failover_set_framebuffer_state;
00476    failover->pipe.set_polygon_stipple = failover_set_polygon_stipple;
00477    failover->pipe.set_scissor_state = failover_set_scissor_state;
00478    failover->pipe.set_sampler_textures = failover_set_sampler_textures;
00479    failover->pipe.set_viewport_state = failover_set_viewport_state;
00480    failover->pipe.set_vertex_buffers = failover_set_vertex_buffers;
00481    failover->pipe.set_vertex_elements = failover_set_vertex_elements;
00482    failover->pipe.set_constant_buffer = failover_set_constant_buffer;
00483 }

void failover_state_emit ( struct failover_context failover  ) 

Definition at line 54 of file fo_state_emit.c.

References pipe_context::bind_blend_state, pipe_context::bind_depth_stencil_alpha_state, pipe_context::bind_fs_state, pipe_context::bind_rasterizer_state, pipe_context::bind_sampler_states, pipe_context::bind_vs_state, failover_context::blend, failover_context::blend_color, failover_context::clip, failover_context::depth_stencil, failover_context::dirty, FO_NEW_BLEND, FO_NEW_BLEND_COLOR, FO_NEW_CLIP, FO_NEW_DEPTH_STENCIL, FO_NEW_FRAGMENT_SHADER, FO_NEW_FRAMEBUFFER, FO_NEW_RASTERIZER, FO_NEW_SAMPLER, FO_NEW_SCISSOR, FO_NEW_STIPPLE, FO_NEW_TEXTURE, FO_NEW_VERTEX_BUFFER, FO_NEW_VERTEX_ELEMENT, FO_NEW_VERTEX_SHADER, FO_NEW_VIEWPORT, failover_context::fragment_shader, failover_context::framebuffer, failover_context::num_samplers, failover_context::num_textures, failover_context::num_vertex_buffers, failover_context::num_vertex_elements, failover_context::poly_stipple, failover_context::rasterizer, failover_context::scissor, pipe_context::set_blend_color, pipe_context::set_clip_state, pipe_context::set_framebuffer_state, pipe_context::set_polygon_stipple, pipe_context::set_sampler_textures, pipe_context::set_scissor_state, pipe_context::set_vertex_buffers, pipe_context::set_vertex_elements, pipe_context::set_viewport_state, failover_context::sw, failover_context::sw_sampler_state, fo_state::sw_state, failover_context::texture, failover_context::vertex_buffers, failover_context::vertex_elements, failover_context::vertex_shader, and failover_context::viewport.

00055 {
00056    if (failover->dirty & FO_NEW_BLEND)
00057       failover->sw->bind_blend_state( failover->sw,
00058                                       failover->blend->sw_state );
00059 
00060    if (failover->dirty & FO_NEW_BLEND_COLOR)
00061       failover->sw->set_blend_color( failover->sw, &failover->blend_color );
00062 
00063    if (failover->dirty & FO_NEW_CLIP)
00064       failover->sw->set_clip_state( failover->sw, &failover->clip );
00065 
00066    if (failover->dirty & FO_NEW_DEPTH_STENCIL)
00067       failover->sw->bind_depth_stencil_alpha_state( failover->sw,
00068                                                     failover->depth_stencil->sw_state );
00069 
00070    if (failover->dirty & FO_NEW_FRAMEBUFFER)
00071       failover->sw->set_framebuffer_state( failover->sw, &failover->framebuffer );
00072 
00073    if (failover->dirty & FO_NEW_FRAGMENT_SHADER)
00074       failover->sw->bind_fs_state( failover->sw,
00075                                    failover->fragment_shader->sw_state );
00076 
00077    if (failover->dirty & FO_NEW_VERTEX_SHADER)
00078       failover->sw->bind_vs_state( failover->sw,
00079                                    failover->vertex_shader->sw_state );
00080 
00081    if (failover->dirty & FO_NEW_STIPPLE)
00082       failover->sw->set_polygon_stipple( failover->sw, &failover->poly_stipple );
00083 
00084    if (failover->dirty & FO_NEW_RASTERIZER)
00085       failover->sw->bind_rasterizer_state( failover->sw,
00086                                            failover->rasterizer->sw_state );
00087 
00088    if (failover->dirty & FO_NEW_SCISSOR)
00089       failover->sw->set_scissor_state( failover->sw, &failover->scissor );
00090 
00091    if (failover->dirty & FO_NEW_VIEWPORT)
00092       failover->sw->set_viewport_state( failover->sw, &failover->viewport );
00093 
00094    if (failover->dirty & FO_NEW_SAMPLER) {
00095       failover->sw->bind_sampler_states( failover->sw, failover->num_samplers,
00096                                          failover->sw_sampler_state );
00097    }
00098 
00099    if (failover->dirty & FO_NEW_TEXTURE) {
00100       failover->sw->set_sampler_textures( failover->sw, failover->num_textures, 
00101                                           failover->texture );
00102    }
00103 
00104    if (failover->dirty & FO_NEW_VERTEX_BUFFER) {
00105       failover->sw->set_vertex_buffers( failover->sw,
00106                                         failover->num_vertex_buffers,
00107                                         failover->vertex_buffers );
00108    }
00109 
00110    if (failover->dirty & FO_NEW_VERTEX_ELEMENT) {
00111       failover->sw->set_vertex_elements( failover->sw,
00112                                          failover->num_vertex_elements,
00113                                          failover->vertex_elements );
00114    }
00115 
00116    failover->dirty = 0;
00117 }


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