These are now per-screen functions, not per-context.
State tracker updated, code in drivers and p_context.h disabled.
}
-static int cell_get_param(struct pipe_context *pipe, int param)
-{
- return pipe->screen->get_param(pipe->screen, param);
-}
-
-static float cell_get_paramf(struct pipe_context *pipe, int param)
-{
- return pipe->screen->get_paramf(pipe->screen, param);
-}
-
-static const char *
-cell_get_name( struct pipe_context *pipe )
-{
- return pipe->screen->get_name(pipe->screen);
-}
-
-static const char *
-cell_get_vendor( struct pipe_context *pipe )
-{
- return pipe->screen->get_vendor(pipe->screen);
-}
-
-
-
static void
cell_destroy_context( struct pipe_context *pipe )
{
/* queries */
cell->pipe.is_format_supported = cell_is_format_supported;
- cell->pipe.get_name = cell_get_name;
- cell->pipe.get_vendor = cell_get_vendor;
- cell->pipe.get_param = cell_get_param;
- cell->pipe.get_paramf = cell_get_paramf;
-
/* state setters */
cell->pipe.set_vertex_buffer = cell_set_vertex_buffer;
failover->hw = hw;
failover->sw = sw;
failover->pipe.winsys = hw->winsys;
+ failover->pipe.screen = hw->screen;
failover->pipe.destroy = failover_destroy;
failover->pipe.is_format_supported = hw->is_format_supported;
+#if 0
failover->pipe.get_name = hw->get_name;
failover->pipe.get_vendor = hw->get_vendor;
failover->pipe.get_param = hw->get_param;
failover->pipe.get_paramf = hw->get_paramf;
+#endif
failover->pipe.draw_arrays = failover_draw_arrays;
failover->pipe.draw_elements = failover_draw_elements;
i915_state_emit.c \
i915_state_sampler.c \
i915_screen.c \
- i915_strings.c \
i915_prim_emit.c \
i915_prim_vbuf.c \
i915_texture.c \
'i915_state_emit.c',
'i915_state_immediate.c',
'i915_state_sampler.c',
- 'i915_strings.c',
'i915_surface.c',
'i915_texture.c',
])
}
-/* XXX temporary */
-static int
-i915_get_param(struct pipe_context *pipe, int param)
-{
- return pipe->screen->get_param(pipe->screen, param);
-}
-
-
-/* XXX temporary */
-static float
-i915_get_paramf(struct pipe_context *pipe, int param)
-{
- return pipe->screen->get_paramf(pipe->screen, param);
-}
-
-
static void i915_destroy( struct pipe_context *pipe )
{
struct i915_context *i915 = i915_context( pipe );
i915->pipe.destroy = i915_destroy;
i915->pipe.is_format_supported = i915_is_format_supported;
- i915->pipe.get_param = i915_get_param;
- i915->pipe.get_paramf = i915_get_paramf;
i915->pipe.clear = i915_clear;
i915_init_surface_functions(i915);
i915_init_state_functions(i915);
i915_init_flush_functions(i915);
- i915_init_string_functions(i915);
i915_init_texture_functions(i915);
draw_install_aaline_stage(i915->draw, &i915->pipe);
*/
i915->batch_start = NULL;
- /*
- * XXX we could plug GL selection/feedback into the drawing pipeline
- * by specifying a different setup/render stage.
- */
-
return &i915->pipe;
}
brw_blit.c \
brw_flush.c \
brw_screen.c \
- brw_strings.c \
brw_surface.c \
brw_cc.c \
brw_clip.c \
'brw_state_cache.c',
'brw_state_pool.c',
'brw_state_upload.c',
- 'brw_strings.c',
'brw_surface.c',
'brw_tex_layout.c',
'brw_urb.c',
}
-static int
-brw_get_param(struct pipe_context *pipe, int param)
-{
- return pipe->screen->get_param(pipe->screen, param);
-}
-
-
-static float
-brw_get_paramf(struct pipe_context *pipe, int param)
-{
- return pipe->screen->get_paramf(pipe->screen, param);
-}
-
-
static boolean
brw_is_format_supported( struct pipe_context *pipe,
enum pipe_format format, uint type )
brw->pipe.destroy = brw_destroy;
brw->pipe.is_format_supported = brw_is_format_supported;
- brw->pipe.get_param = brw_get_param;
- brw->pipe.get_paramf = brw_get_paramf;
brw->pipe.clear = brw_clear;
brw_init_surface_functions(brw);
brw_init_texture_functions(brw);
brw_init_state_functions(brw);
brw_init_flush_functions(brw);
- brw_init_string_functions(brw);
brw_init_draw_functions( brw );
}
-/* XXX these will go away shortly */
-static const char *softpipe_get_name( struct pipe_context *pipe )
-{
- return pipe->screen->get_name(pipe->screen);
-}
-
-static const char *softpipe_get_vendor( struct pipe_context *pipe )
-{
- return pipe->screen->get_vendor(pipe->screen);
-}
-
-static int softpipe_get_param(struct pipe_context *pipe, int param)
-{
- return pipe->screen->get_param(pipe->screen, param);
-}
-
-static float softpipe_get_paramf(struct pipe_context *pipe, int param)
-{
- return pipe->screen->get_paramf(pipe->screen, param);
-}
-
struct pipe_context *
softpipe_create( struct pipe_screen *screen,
struct pipe_winsys *pipe_winsys,
/* queries */
softpipe->pipe.is_format_supported = softpipe_is_format_supported;
- softpipe->pipe.get_name = softpipe_get_name;
- softpipe->pipe.get_vendor = softpipe_get_vendor;
- softpipe->pipe.get_param = softpipe_get_param;
- softpipe->pipe.get_paramf = softpipe_get_paramf;
/* state setters */
softpipe->pipe.create_blend_state = softpipe_create_blend_state;
boolean (*is_format_supported)( struct pipe_context *pipe,
enum pipe_format format, uint type );
+#if 0
+ /* XXX obsolete, moved into pipe_screen */
const char *(*get_name)( struct pipe_context *pipe );
const char *(*get_vendor)( struct pipe_context *pipe );
int (*get_param)( struct pipe_context *pipe, int param );
float (*get_paramf)( struct pipe_context *pipe, int param );
+#endif
/*
/* XXX if DrawPixels image is larger than max texture size, break
* it up into chunks.
*/
- maxSize = 1 << (pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
+ maxSize = 1 << (pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
assert(width <= maxSize);
assert(height <= maxSize);
#include "main/macros.h"
#include "main/version.h"
#include "pipe/p_context.h"
+#include "pipe/p_screen.h"
#include "pipe/p_winsys.h"
#include "st_context.h"
#include "st_cb_strings.h"
st_get_string(GLcontext * ctx, GLenum name)
{
struct st_context *st = st_context(ctx);
- struct pipe_context *pipe = st->pipe;
+ struct pipe_screen *screen = st->pipe->screen;
switch (name) {
case GL_VENDOR: {
- const char *vendor = pipe->get_vendor( pipe );
+ const char *vendor = screen->get_vendor( screen );
const char *tungsten = "Tungsten Graphics, Inc.";
/* Tungsten developed the state_tracker module (and much of
case GL_RENDERER:
snprintf(st->renderer, sizeof(st->renderer), "Gallium %s, %s on %s",
ST_VERSION_STRING,
- pipe->get_name( pipe ),
- pipe->winsys->get_name( pipe->winsys ));
+ screen->get_name( screen ),
+ screen->winsys->get_name( screen->winsys ));
return (GLubyte *) st->renderer;
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
+#include "pipe/p_screen.h"
#include "st_context.h"
#include "st_extensions.h"
*/
void st_init_limits(struct st_context *st)
{
- struct pipe_context *pipe = st->pipe;
+ struct pipe_screen *screen = st->pipe->screen;
struct gl_constants *c = &st->ctx->Const;
c->MaxTextureLevels
- = min(pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
+ = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
MAX_TEXTURE_LEVELS);
c->Max3DTextureLevels
- = min(pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),
+ = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),
MAX_3D_TEXTURE_LEVELS);
c->MaxCubeTextureLevels
- = min(pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS),
+ = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS),
MAX_CUBE_TEXTURE_LEVELS);
c->MaxTextureRectSize
c->MaxTextureImageUnits
= c->MaxTextureCoordUnits
- = min(pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
+ = min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
MAX_TEXTURE_IMAGE_UNITS);
c->MaxDrawBuffers
- = clamp(pipe->get_param(pipe, PIPE_CAP_MAX_RENDER_TARGETS),
+ = clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
1, MAX_DRAW_BUFFERS);
c->MaxLineWidth
- = max(1.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_LINE_WIDTH));
+ = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH));
c->MaxLineWidthAA
- = max(1.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_LINE_WIDTH_AA));
+ = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH_AA));
c->MaxPointSize
- = max(1.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_POINT_WIDTH));
+ = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH));
c->MaxPointSizeAA
- = max(1.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_POINT_WIDTH_AA));
+ = max(1.0, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH_AA));
c->MaxTextureMaxAnisotropy
- = max(2.0, pipe->get_paramf(pipe, PIPE_CAP_MAX_TEXTURE_ANISOTROPY));
+ = max(2.0, screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_ANISOTROPY));
c->MaxTextureLodBias
- = pipe->get_paramf(pipe, PIPE_CAP_MAX_TEXTURE_LOD_BIAS);
+ = screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_LOD_BIAS);
st->bitmap_texcoord_bias
- = pipe->get_paramf(pipe, PIPE_CAP_BITMAP_TEXCOORD_BIAS);
+ = screen->get_paramf(screen, PIPE_CAP_BITMAP_TEXCOORD_BIAS);
}
*/
void st_init_extensions(struct st_context *st)
{
- struct pipe_context *pipe = st->pipe;
+ struct pipe_screen *screen = st->pipe->screen;
GLcontext *ctx = st->ctx;
/*
/*
* Extensions that depend on the driver/hardware:
*/
- if (pipe->get_param(pipe, PIPE_CAP_MAX_RENDER_TARGETS) > 0) {
+ if (screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS) > 0) {
ctx->Extensions.ARB_draw_buffers = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_GLSL)) {
+ if (screen->get_param(screen, PIPE_CAP_GLSL)) {
ctx->Extensions.ARB_fragment_shader = GL_TRUE;
ctx->Extensions.ARB_vertex_shader = GL_TRUE;
ctx->Extensions.ARB_shader_objects = GL_TRUE;
ctx->Extensions.ARB_shading_language_120 = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_NPOT_TEXTURES)) {
+ if (screen->get_param(screen, PIPE_CAP_NPOT_TEXTURES)) {
ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
ctx->Extensions.NV_texture_rectangle = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS) > 1) {
+ if (screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS) > 1) {
ctx->Extensions.ARB_multitexture = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_TWO_SIDED_STENCIL)) {
+ if (screen->get_param(screen, PIPE_CAP_TWO_SIDED_STENCIL)) {
ctx->Extensions.ATI_separate_stencil = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_S3TC)) {
+ if (screen->get_param(screen, PIPE_CAP_S3TC)) {
ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_ANISOTROPIC_FILTER)) {
+ if (screen->get_param(screen, PIPE_CAP_ANISOTROPIC_FILTER)) {
ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_POINT_SPRITE)) {
+ if (screen->get_param(screen, PIPE_CAP_POINT_SPRITE)) {
ctx->Extensions.ARB_point_sprite = GL_TRUE;
ctx->Extensions.NV_point_sprite = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_OCCLUSION_QUERY)) {
+ if (screen->get_param(screen, PIPE_CAP_OCCLUSION_QUERY)) {
ctx->Extensions.ARB_occlusion_query = GL_TRUE;
}
- if (pipe->get_param(pipe, PIPE_CAP_TEXTURE_SHADOW_MAP)) {
+ if (screen->get_param(screen, PIPE_CAP_TEXTURE_SHADOW_MAP)) {
ctx->Extensions.ARB_depth_texture = GL_TRUE;
ctx->Extensions.ARB_shadow = GL_TRUE;
ctx->Extensions.EXT_shadow_funcs = GL_TRUE;