ReactOS  0.4.12-dev-375-g61fed54
s_context.h File Reference

Software rasterization context and private types. More...

#include "main/compiler.h"
#include "main/mtypes.h"
#include "swrast.h"
#include "s_span.h"
Include dependency graph for s_context.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  swrast_texture_image
 
struct  swrast_renderbuffer
 
struct  SWcontext
 Per-context state that's private to the software rasterizer module. More...
 

Macros

#define ALPHATEST_BIT   0x001
 
#define BLEND_BIT   0x002
 
#define DEPTH_BIT   0x004
 
#define FOG_BIT   0x008
 
#define LOGIC_OP_BIT   0x010
 
#define CLIP_BIT   0x020
 
#define STENCIL_BIT   0x040
 
#define MASKING_BIT   0x080
 
#define MULTI_DRAW_BIT   0x400
 
#define TEXTURE_BIT   0x1000
 
#define CLAMPING_BIT   0x8000
 
#define _SWRAST_NEW_RASTERMASK
 
#define RGBA_PIXEL_SIZE(TYPE)
 
#define FIXED_FRAC_BITS   11
 
#define FIXED_SHIFT   FIXED_FRAC_BITS
 
#define FIXED_ONE   (1 << FIXED_SHIFT)
 
#define FIXED_HALF   (1 << (FIXED_SHIFT-1))
 
#define FIXED_FRAC_MASK   (FIXED_ONE - 1)
 
#define FIXED_INT_MASK   (~FIXED_FRAC_MASK)
 
#define FIXED_EPSILON   1
 
#define FIXED_SCALE   ((float) FIXED_ONE)
 
#define FIXED_DBL_SCALE   ((double) FIXED_ONE)
 
#define FloatToFixed(X)   (IROUND((X) * FIXED_SCALE))
 
#define FixedToDouble(X)   ((X) * (1.0 / FIXED_DBL_SCALE))
 
#define IntToFixed(I)   ((I) << FIXED_SHIFT)
 
#define FixedToInt(X)   ((X) >> FIXED_SHIFT)
 
#define FixedToUns(X)   (((unsigned int)(X)) >> FIXED_SHIFT)
 
#define FixedCeil(X)   (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK)
 
#define FixedFloor(X)   ((X) & FIXED_INT_MASK)
 
#define FixedToFloat(X)   ((X) * (1.0F / FIXED_SCALE))
 
#define PosFloatToFixed(X)   FloatToFixed(X)
 
#define SignedFloatToFixed(X)   FloatToFixed(X)
 
#define ChanToFixed(X)   (X)
 
#define FixedToChan(X)   (X)
 
#define ATTRIB_LOOP_BEGIN
 
#define ATTRIB_LOOP_END   } }
 

Typedefs

typedef void(* texture_sample_func) (struct gl_context *ctx, const struct gl_texture_object *tObj, GLuint n, const GLfloat texcoords[][4], const GLfloat lambda[], GLfloat rgba[][4])
 
typedef GLuint n
 
typedef GLuint const GLubyte mask[] = -1
 
typedef GLuint const GLubyte GLvoidsrc
 
typedef GLuint const GLubyte GLvoid const GLvoiddst
 
typedef GLuint const GLubyte GLvoid const GLvoid GLenum chanType
 
typedef void(* swrast_point_func) (struct gl_context *ctx, const SWvertex *)
 
typedef void(* swrast_line_func) (struct gl_context *ctx, const SWvertex *, const SWvertex *)
 
typedef void(* swrast_tri_func) (struct gl_context *ctx, const SWvertex *, const SWvertex *, const SWvertex *)
 
typedef void(* validate_texture_image_func) (struct gl_context *ctx, struct gl_texture_object *texObj, GLuint face, GLuint level)
 
typedef void(* FetchTexelFunc) (const struct swrast_texture_image *texImage, GLint col, GLint row, GLint img, GLfloat *texelOut)
 

Functions

typedef void (_ASMAPIP blend_func)(struct gl_context *ctx
 
static struct swrast_texture_imageswrast_texture_image (struct gl_texture_image *img)
 
static const struct swrast_texture_imageswrast_texture_image_const (const struct gl_texture_image *img)
 
static struct swrast_renderbufferswrast_renderbuffer (struct gl_renderbuffer *img)
 
void _swrast_validate_derived (struct gl_context *ctx)
 
void _swrast_update_texture_samplers (struct gl_context *ctx)
 
static SWcontextSWRAST_CONTEXT (struct gl_context *ctx)
 
static const SWcontextCONST_SWRAST_CONTEXT (const struct gl_context *ctx)
 
static void swrast_render_start (struct gl_context *ctx)
 
static void swrast_render_finish (struct gl_context *ctx)
 
void _swrast_span_render_start (struct gl_context *ctx)
 
void _swrast_span_render_finish (struct gl_context *ctx)
 
void _swrast_map_textures (struct gl_context *ctx)
 
void _swrast_unmap_textures (struct gl_context *ctx)
 
void _swrast_map_texture (struct gl_context *ctx, struct gl_texture_object *texObj)
 
void _swrast_unmap_texture (struct gl_context *ctx, struct gl_texture_object *texObj)
 
void _swrast_map_renderbuffers (struct gl_context *ctx)
 
void _swrast_unmap_renderbuffers (struct gl_context *ctx)
 
static GLubyte_swrast_pixel_address (struct gl_renderbuffer *rb, GLint x, GLint y)
 

Detailed Description

Software rasterization context and private types.

Author
Keith Whitwell keith.nosp@m.@tun.nosp@m.gsten.nosp@m.grap.nosp@m.hics..nosp@m.com

Definition in file s_context.h.

Macro Definition Documentation

◆ _SWRAST_NEW_RASTERMASK

#define _SWRAST_NEW_RASTERMASK
Value:
_NEW_SCISSOR| \
_NEW_COLOR| \
_NEW_DEPTH| \
_NEW_FOG| \
_NEW_STENCIL| \
_NEW_TEXTURE| \
_NEW_VIEWPORT| \
_NEW_DEPTH)
#define _NEW_BUFFERS
Definition: mtypes.h:1609

Definition at line 96 of file s_context.h.

◆ ATTRIB_LOOP_BEGIN

#define ATTRIB_LOOP_BEGIN
Value:
{ \
GLuint a; \
for (a = 0; a < swrast->_NumActiveAttribs; a++) { \
const GLuint attr = swrast->_ActiveAttribs[a];
#define a
Definition: ke_i.h:78
void swrast
Definition: s_aatritemp.h:63
Definition: cookie.c:170
unsigned int GLuint
Definition: gl.h:159
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

For looping over fragment attributes in the pointe, line triangle rasterizers.

Definition at line 429 of file s_context.h.

◆ ATTRIB_LOOP_END

#define ATTRIB_LOOP_END   } }

Definition at line 435 of file s_context.h.

◆ ChanToFixed

#define ChanToFixed (   X)    (X)

Definition at line 417 of file s_context.h.

◆ FIXED_DBL_SCALE

#define FIXED_DBL_SCALE   ((double) FIXED_ONE)

Definition at line 397 of file s_context.h.

◆ FIXED_EPSILON

#define FIXED_EPSILON   1

Definition at line 395 of file s_context.h.

◆ FIXED_FRAC_BITS

#define FIXED_FRAC_BITS   11

Definition at line 387 of file s_context.h.

◆ FIXED_FRAC_MASK

#define FIXED_FRAC_MASK   (FIXED_ONE - 1)

Definition at line 393 of file s_context.h.

◆ FIXED_HALF

#define FIXED_HALF   (1 << (FIXED_SHIFT-1))

Definition at line 392 of file s_context.h.

◆ FIXED_INT_MASK

#define FIXED_INT_MASK   (~FIXED_FRAC_MASK)

Definition at line 394 of file s_context.h.

◆ FIXED_ONE

#define FIXED_ONE   (1 << FIXED_SHIFT)

Definition at line 391 of file s_context.h.

◆ FIXED_SCALE

#define FIXED_SCALE   ((float) FIXED_ONE)

Definition at line 396 of file s_context.h.

◆ FIXED_SHIFT

#define FIXED_SHIFT   FIXED_FRAC_BITS

Definition at line 390 of file s_context.h.

◆ FixedCeil

#define FixedCeil (   X)    (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK)

Definition at line 403 of file s_context.h.

◆ FixedFloor

#define FixedFloor (   X)    ((X) & FIXED_INT_MASK)

Definition at line 404 of file s_context.h.

◆ FixedToChan

#define FixedToChan (   X)    (X)

Definition at line 418 of file s_context.h.

◆ FixedToDouble

#define FixedToDouble (   X)    ((X) * (1.0 / FIXED_DBL_SCALE))

Definition at line 399 of file s_context.h.

◆ FixedToFloat

#define FixedToFloat (   X)    ((X) * (1.0F / FIXED_SCALE))

Definition at line 405 of file s_context.h.

◆ FixedToInt

#define FixedToInt (   X)    ((X) >> FIXED_SHIFT)

Definition at line 401 of file s_context.h.

◆ FixedToUns

#define FixedToUns (   X)    (((unsigned int)(X)) >> FIXED_SHIFT)

Definition at line 402 of file s_context.h.

◆ FloatToFixed

#define FloatToFixed (   X)    (IROUND((X) * FIXED_SCALE))

Definition at line 398 of file s_context.h.

◆ IntToFixed

#define IntToFixed (   I)    ((I) << FIXED_SHIFT)

Definition at line 400 of file s_context.h.

◆ PosFloatToFixed

#define PosFloatToFixed (   X)    FloatToFixed(X)

Definition at line 406 of file s_context.h.

◆ RGBA_PIXEL_SIZE

#define RGBA_PIXEL_SIZE (   TYPE)
Value:
((TYPE == GL_UNSIGNED_BYTE) ? 4 * sizeof(GLubyte) : \
((TYPE == GL_UNSIGNED_SHORT) ? 4 * sizeof(GLushort) \
: 4 * sizeof(GLfloat)))
#define GL_UNSIGNED_SHORT
Definition: gl.h:180
#define GL_UNSIGNED_BYTE
Definition: gl.h:178
float GLfloat
Definition: gl.h:161
unsigned short GLushort
Definition: gl.h:158
unsigned char GLubyte
Definition: gl.h:157
TYPE
Definition: eventcreate.c:651

Size of an RGBA pixel, in bytes, for given datatype.

Definition at line 376 of file s_context.h.

◆ SignedFloatToFixed

#define SignedFloatToFixed (   X)    FloatToFixed(X)

Definition at line 407 of file s_context.h.

Typedef Documentation

◆ chanType

Definition at line 57 of file s_context.h.

◆ dst

typedef GLenum GLenum dst

Definition at line 57 of file s_context.h.

◆ FetchTexelFunc

typedef void(* FetchTexelFunc) (const struct swrast_texture_image *texImage, GLint col, GLint row, GLint img, GLfloat *texelOut)

Fetch a texel from texture image at given position.

Definition at line 113 of file s_context.h.

◆ mask

typedef GLuint mask = -1

Definition at line 57 of file s_context.h.

◆ n

typedef GLsizei n

Definition at line 57 of file s_context.h.

◆ src

typedef GLenum src

Definition at line 57 of file s_context.h.

◆ swrast_line_func

typedef void(* swrast_line_func) (struct gl_context *ctx, const SWvertex *, const SWvertex *)

Definition at line 64 of file s_context.h.

◆ swrast_point_func

typedef void(* swrast_point_func) (struct gl_context *ctx, const SWvertex *)

Definition at line 62 of file s_context.h.

◆ swrast_tri_func

typedef void(* swrast_tri_func) (struct gl_context *ctx, const SWvertex *, const SWvertex *, const SWvertex *)

Definition at line 67 of file s_context.h.

◆ texture_sample_func

typedef void(* texture_sample_func) (struct gl_context *ctx, const struct gl_texture_object *tObj, GLuint n, const GLfloat texcoords[][4], const GLfloat lambda[], GLfloat rgba[][4])

Definition at line 52 of file s_context.h.

◆ validate_texture_image_func

typedef void(* validate_texture_image_func) (struct gl_context *ctx, struct gl_texture_object *texObj, GLuint face, GLuint level)

Definition at line 71 of file s_context.h.

Function Documentation

◆ _swrast_map_renderbuffers()

void _swrast_map_renderbuffers ( struct gl_context ctx)

Map the renderbuffers we'll use for tri/line/point rendering.

Definition at line 537 of file s_renderbuffer.c.

538 {
539  struct gl_framebuffer *fb = ctx->DrawBuffer;
540  struct gl_renderbuffer *depthRb, *stencilRb;
541 
542  depthRb = fb->Attachment[BUFFER_DEPTH].Renderbuffer;
543  if (depthRb) {
544  /* map depth buffer */
545  map_attachment(ctx, fb, BUFFER_DEPTH);
546  }
547 
548  stencilRb = fb->Attachment[BUFFER_STENCIL].Renderbuffer;
549  if (stencilRb && stencilRb != depthRb) {
550  /* map stencil buffer */
551  map_attachment(ctx, fb, BUFFER_STENCIL);
552  }
553 
556 }
static void map_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, gl_buffer_index buffer)
struct gl_framebuffer * DrawBuffer
Definition: mtypes.h:1765
GLint _ColorDrawBufferIndex
Definition: mtypes.h:1426
struct gl_renderbuffer * _ColorDrawBuffer
Definition: mtypes.h:1428
static void find_renderbuffer_colortype(struct gl_renderbuffer *rb)
struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]
Definition: mtypes.h:1417

Referenced by _swrast_span_render_start().

◆ _swrast_map_texture()

void _swrast_map_texture ( struct gl_context ctx,
struct gl_texture_object texObj 
)

Definition at line 223 of file s_texture.c.

224 {
225  const GLuint faces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
226  GLuint face, level;
227 
228  for (face = 0; face < faces; face++) {
229  for (level = texObj->BaseLevel; level < MAX_TEXTURE_LEVELS; level++) {
230  struct gl_texture_image *texImage = texObj->Image[face][level];
231  if (texImage) {
232  struct swrast_texture_image *swImage =
233  swrast_texture_image(texImage);
234 
235  /* XXX we'll eventually call _swrast_map_teximage() here */
236  swImage->Map = swImage->Buffer;
237  }
238  }
239  }
240 }
GLint level
Definition: gl.h:1546
static struct swrast_texture_image * swrast_texture_image(struct gl_texture_image *img)
Definition: s_context.h:147
#define MAX_TEXTURE_LEVELS
Definition: config.h:104
WORD face[3]
Definition: mesh.c:4747
struct gl_texture_image * Image[MAX_FACES][MAX_TEXTURE_LEVELS]
Definition: mtypes.h:971
GLenum Target
Definition: mtypes.h:957
GLint BaseLevel
Definition: mtypes.h:962
#define GL_TEXTURE_CUBE_MAP
Definition: gl.h:1788
unsigned int GLuint
Definition: gl.h:159
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Referenced by _swrast_map_textures().

◆ _swrast_map_textures()

void _swrast_map_textures ( struct gl_context ctx)

Map all textures for reading prior to software rendering.

Definition at line 268 of file s_texture.c.

269 {
270  if (ctx->Texture._Enabled) {
271  struct gl_texture_object *texObj = ctx->Texture.Unit._Current;
272 
273  _swrast_map_texture(ctx, texObj);
274  }
275 }
void _swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
Definition: s_texture.c:223
struct gl_texture_attrib Texture
Definition: mtypes.h:1833

Referenced by _swrast_span_render_start().

◆ _swrast_pixel_address()

static GLubyte* _swrast_pixel_address ( struct gl_renderbuffer rb,
GLint  x,
GLint  y 
)
inlinestatic

Return the address of a pixel value in a mapped renderbuffer.

Definition at line 442 of file s_context.h.

443 {
444  struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
445  const GLint bpp = _mesa_get_format_bytes(rb->Format);
446  const GLint rowStride = srb->RowStride;
447  assert(x >= 0);
448  assert(y >= 0);
449  /* NOTE: using <= only because of s_tritemp.h which gets a pixel
450  * address but doesn't necessarily access it.
451  */
452  assert(x <= (GLint) rb->Width);
453  assert(y <= (GLint) rb->Height);
454  assert(srb->Map);
455  return (GLubyte *) srb->Map + y * rowStride + x * bpp;
456 }
#define assert(x)
Definition: debug.h:53
gl_format Format
Definition: mtypes.h:1351
GLint _mesa_get_format_bytes(gl_format format)
Definition: formats.c:786
INT INT y
Definition: msvc.h:62
static struct swrast_renderbuffer * swrast_renderbuffer(struct gl_renderbuffer *img)
Definition: s_context.h:181
GLuint Width
Definition: mtypes.h:1345
unsigned char GLubyte
Definition: gl.h:157
GLuint Height
Definition: mtypes.h:1345
INT x
Definition: msvc.h:62
DWORD bpp
Definition: surface.c:181
const GLint const GLsizei GLint
Definition: dispatch.h:5271

Referenced by _swrast_depth_bounds_test(), _swrast_depth_test_span(), _swrast_put_row(), _swrast_read_depth_span_float(), _swrast_read_rgba_span(), _swrast_read_stencil_span(), _swrast_stencil_and_ztest_span(), _swrast_write_stencil_span(), _swrast_write_zoomed_z_span(), get_row(), get_s8_values(), get_values(), get_z32_values(), NAME(), put_s8_values(), put_values(), and put_z32_values().

◆ _swrast_span_render_finish()

void _swrast_span_render_finish ( struct gl_context ctx)

called via swrast->Driver.SpanRenderFinish()

Definition at line 674 of file s_context.c.

675 {
678 }
void _swrast_unmap_textures(struct gl_context *ctx)
Definition: s_texture.c:282
void _swrast_unmap_renderbuffers(struct gl_context *ctx)

Referenced by _swrast_CreateContext().

◆ _swrast_span_render_start()

void _swrast_span_render_start ( struct gl_context ctx)

called via swrast->Driver.SpanRenderStart()

Definition at line 665 of file s_context.c.

666 {
669 }
void _swrast_map_renderbuffers(struct gl_context *ctx)
void _swrast_map_textures(struct gl_context *ctx)
Definition: s_texture.c:268

Referenced by _swrast_CreateContext().

◆ _swrast_unmap_renderbuffers()

void _swrast_unmap_renderbuffers ( struct gl_context ctx)

Unmap renderbuffers after rendering.

Definition at line 563 of file s_renderbuffer.c.

564 {
565  struct gl_framebuffer *fb = ctx->DrawBuffer;
566  struct gl_renderbuffer *depthRb, *stencilRb;
567 
568  depthRb = fb->Attachment[BUFFER_DEPTH].Renderbuffer;
569  if (depthRb) {
570  /* map depth buffer */
571  unmap_attachment(ctx, fb, BUFFER_DEPTH);
572  }
573 
574  stencilRb = fb->Attachment[BUFFER_STENCIL].Renderbuffer;
575  if (stencilRb && stencilRb != depthRb) {
576  /* map stencil buffer */
578  }
579 
581 }
struct gl_framebuffer * DrawBuffer
Definition: mtypes.h:1765
static void unmap_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, gl_buffer_index buffer)
GLint _ColorDrawBufferIndex
Definition: mtypes.h:1426
struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]
Definition: mtypes.h:1417

Referenced by _swrast_span_render_finish().

◆ _swrast_unmap_texture()

void _swrast_unmap_texture ( struct gl_context ctx,
struct gl_texture_object texObj 
)

Definition at line 244 of file s_texture.c.

245 {
246  const GLuint faces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
247  GLuint face, level;
248 
249  for (face = 0; face < faces; face++) {
250  for (level = texObj->BaseLevel; level < MAX_TEXTURE_LEVELS; level++) {
251  struct gl_texture_image *texImage = texObj->Image[face][level];
252  if (texImage) {
253  struct swrast_texture_image *swImage
254  = swrast_texture_image(texImage);
255 
256  /* XXX we'll eventually call _swrast_unmap_teximage() here */
257  swImage->Map = NULL;
258  }
259  }
260  }
261 }
GLint level
Definition: gl.h:1546
static struct swrast_texture_image * swrast_texture_image(struct gl_texture_image *img)
Definition: s_context.h:147
#define MAX_TEXTURE_LEVELS
Definition: config.h:104
WORD face[3]
Definition: mesh.c:4747
struct gl_texture_image * Image[MAX_FACES][MAX_TEXTURE_LEVELS]
Definition: mtypes.h:971
smooth NULL
Definition: ftsmooth.c:416
GLenum Target
Definition: mtypes.h:957
GLint BaseLevel
Definition: mtypes.h:962
#define GL_TEXTURE_CUBE_MAP
Definition: gl.h:1788
unsigned int GLuint
Definition: gl.h:159
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Referenced by _swrast_unmap_textures().

◆ _swrast_unmap_textures()

void _swrast_unmap_textures ( struct gl_context ctx)

Unmap all textures for reading prior to software rendering.

Definition at line 282 of file s_texture.c.

283 {
284  if(ctx->Texture._Enabled) {
285  struct gl_texture_object *texObj = ctx->Texture.Unit._Current;
286 
287  _swrast_unmap_texture(ctx, texObj);
288  }
289 }
struct gl_texture_attrib Texture
Definition: mtypes.h:1833
void _swrast_unmap_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
Definition: s_texture.c:244

Referenced by _swrast_span_render_finish().

◆ _swrast_update_texture_samplers()

void _swrast_update_texture_samplers ( struct gl_context ctx)

Definition at line 346 of file s_context.c.

347 {
349  struct gl_texture_object *tObj;
350 
351  if (!swrast)
352  return; /* pipe hack */
353 
354  tObj = ctx->Texture.Unit._Current;
355 
356  /* Note: If tObj is NULL, the sample function will be a simple
357  * function that just returns opaque black (0,0,0,1).
358  */
359  if (tObj) {
361  }
362  swrast->TextureSample = _swrast_choose_texture_sample_func(ctx, tObj);
363 }
static SWcontext * SWRAST_CONTEXT(struct gl_context *ctx)
Definition: s_context.h:310
texture_sample_func _swrast_choose_texture_sample_func(struct gl_context *ctx, const struct gl_texture_object *t)
Definition: s_texfilter.c:1850
void _mesa_update_fetch_functions(struct gl_texture_object *texObj)
Definition: s_texfetch.c:607
struct gl_texture_attrib Texture
Definition: mtypes.h:1833
void swrast
Definition: s_aatritemp.h:63
Per-context state that's private to the software rasterizer module.
Definition: s_context.h:192

Referenced by _swrast_validate_derived().

◆ _swrast_validate_derived()

void _swrast_validate_derived ( struct gl_context ctx)

Definition at line 411 of file s_context.c.

412 {
414 
415  if (swrast->NewState) {
416  if (swrast->NewState & _NEW_POLYGON)
417  _swrast_update_polygon( ctx );
418 
419  if (swrast->NewState & _NEW_HINT)
421 
422  if (swrast->NewState & _SWRAST_NEW_TEXTURE_ENV_MODE)
424 
425  if (swrast->NewState & _NEW_FOG)
427 
428  if (swrast->NewState & _NEW_TEXTURE) {
430  }
431 
432  if (swrast->NewState & _NEW_COLOR)
434 
435  if (swrast->NewState & _SWRAST_NEW_RASTERMASK)
437 
438  if (swrast->NewState & (_NEW_DEPTH |
439  _NEW_FOG |
440  _NEW_LIGHT |
441  _NEW_TEXTURE))
443 
444  swrast->NewState = 0;
445  swrast->StateChanges = 0;
446  swrast->InvalidateState = _swrast_invalidate_state;
447  }
448 }
static void _swrast_invalidate_state(struct gl_context *ctx, GLbitfield new_state)
Definition: s_context.c:313
static void _swrast_update_fog_state(struct gl_context *ctx)
Definition: s_context.c:184
#define _NEW_LIGHT
Definition: mtypes.h:1595
#define _NEW_COLOR
Definition: mtypes.h:1590
#define _SWRAST_NEW_TEXTURE_ENV_MODE
Definition: s_context.c:231
static SWcontext * SWRAST_CONTEXT(struct gl_context *ctx)
Definition: s_context.h:310
static void _swrast_update_rasterflags(struct gl_context *ctx)
Definition: s_context.c:38
#define _NEW_POLYGON
Definition: mtypes.h:1599
static void _swrast_update_polygon(struct gl_context *ctx)
Definition: s_context.c:89
#define _NEW_HINT
Definition: mtypes.h:1594
void swrast
Definition: s_aatritemp.h:63
static void _swrast_update_fog_hint(struct gl_context *ctx)
Definition: s_context.c:125
static void _swrast_update_deferred_texture(struct gl_context *ctx)
Definition: s_context.c:167
void _swrast_update_texture_samplers(struct gl_context *ctx)
Definition: s_context.c:346
static void _swrast_update_active_attribs(struct gl_context *ctx)
Definition: s_context.c:371
#define _SWRAST_NEW_RASTERMASK
Definition: s_context.h:96
#define _NEW_TEXTURE
Definition: mtypes.h:1603
Per-context state that's private to the software rasterizer module.
Definition: s_context.h:192
#define _NEW_FOG
Definition: mtypes.h:1593
static void _swrast_update_texture_env(struct gl_context *ctx)
Definition: s_context.c:139
#define _NEW_DEPTH
Definition: mtypes.h:1591

Referenced by _swrast_Bitmap(), _swrast_Clear(), _swrast_CopyPixels(), _swrast_DrawPixels(), _swrast_validate_blend_func(), _swrast_validate_line(), _swrast_validate_point(), and _swrast_validate_triangle().

◆ CONST_SWRAST_CONTEXT()

static const SWcontext* CONST_SWRAST_CONTEXT ( const struct gl_context ctx)
inlinestatic

const version of above

Definition at line 317 of file s_context.h.

318 {
319  return (const SWcontext *) ctx->swrast_context;
320 }
void * swrast_context
Definition: mtypes.h:1920
Per-context state that's private to the software rasterizer module.
Definition: s_context.h:192

Referenced by _swrast_fog_rgba_span().

◆ SWRAST_CONTEXT()

static SWcontext* SWRAST_CONTEXT ( struct gl_context ctx)
inlinestatic

Return SWcontext for the given struct gl_context

Definition at line 310 of file s_context.h.

311 {
312  return (SWcontext *) ctx->swrast_context;
313 }
void * swrast_context
Definition: mtypes.h:1920
Per-context state that's private to the software rasterizer module.
Definition: s_context.h:192

Referenced by _swrast_allow_pixel_fog(), _swrast_allow_vertex_fog(), _swrast_Bitmap(), _swrast_blend_span(), _swrast_choose_aa_line_function(), _swrast_choose_blend_func(), _swrast_choose_line(), _swrast_choose_point(), _swrast_choose_triangle(), _swrast_Clear(), _swrast_CopyPixels(), _swrast_culltriangle(), _swrast_DestroyContext(), _swrast_DrawPixels(), _swrast_feedback_line(), _swrast_flush(), _swrast_GetDeviceDriverReference(), _swrast_invalidate_state(), _swrast_InvalidateState(), _swrast_Line(), _swrast_Point(), _swrast_Quad(), _swrast_render_finish(), _swrast_render_primitive(), _swrast_render_start(), _swrast_ResetLineStipple(), _swrast_set_aa_triangle_function(), _swrast_span_default_attribs(), _swrast_texture_span(), _swrast_Triangle(), _swrast_update_active_attribs(), _swrast_update_deferred_texture(), _swrast_update_fog_hint(), _swrast_update_fog_state(), _swrast_update_polygon(), _swrast_update_rasterflags(), _swrast_update_texture_env(), _swrast_update_texture_samplers(), _swrast_validate_blend_func(), _swrast_validate_derived(), _swrast_validate_line(), _swrast_validate_point(), _swrast_validate_triangle(), _swrast_write_rgba_span(), compute_stipple_mask(), fast_draw_rgba_pixels(), for(), if(), interpolate_active_attribs(), large_point(), line(), NAME(), pixel_point(), plot(), smooth_point(), sprite_point(), swrast_render_finish(), swrast_render_start(), texture_combine(), and zoom_span().

◆ swrast_render_finish()

static void swrast_render_finish ( struct gl_context ctx)
inlinestatic

Called after framebuffer reading/writing

Definition at line 339 of file s_context.h.

340 {
342  if (swrast->Driver.SpanRenderFinish)
343  swrast->Driver.SpanRenderFinish(ctx);
344 }
static SWcontext * SWRAST_CONTEXT(struct gl_context *ctx)
Definition: s_context.h:310
void swrast
Definition: s_aatritemp.h:63
Per-context state that's private to the software rasterizer module.
Definition: s_context.h:192

Referenced by _swrast_Bitmap(), _swrast_CopyPixels(), _swrast_DrawPixels(), and draw_rgba_pixels().

◆ swrast_render_start()

static void swrast_render_start ( struct gl_context ctx)
inlinestatic

Called prior to framebuffer reading/writing. For drivers that rely on swrast for fallback rendering, this is the driver's opportunity to map renderbuffers and textures.

Definition at line 329 of file s_context.h.

330 {
332  if (swrast->Driver.SpanRenderStart)
333  swrast->Driver.SpanRenderStart(ctx);
334 }
static SWcontext * SWRAST_CONTEXT(struct gl_context *ctx)
Definition: s_context.h:310
void swrast
Definition: s_aatritemp.h:63
Per-context state that's private to the software rasterizer module.
Definition: s_context.h:192

Referenced by _swrast_Bitmap(), _swrast_CopyPixels(), _swrast_DrawPixels(), and draw_rgba_pixels().

◆ swrast_renderbuffer()

◆ swrast_texture_image()

◆ swrast_texture_image_const()

◆ void()

typedef void ( _ASMAPIP  blend_func)