Go to the source code of this file.
Functions | |
static const char * | cell_get_vendor (struct pipe_screen *screen) |
static const char * | cell_get_name (struct pipe_screen *screen) |
static int | cell_get_param (struct pipe_screen *screen, int param) |
static float | cell_get_paramf (struct pipe_screen *screen, int param) |
static boolean | cell_is_format_supported (struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, unsigned tex_usage, unsigned geom_flags) |
static void | cell_destroy_screen (struct pipe_screen *screen) |
struct pipe_screen * | cell_create_screen (struct pipe_winsys *winsys) |
Create a new pipe_screen object Note: we're not presently subclassing pipe_screen (no cell_screen) but that would be the place to put SPU thread/context info. |
struct pipe_screen* cell_create_screen | ( | struct pipe_winsys * | winsys | ) | [read] |
Create a new pipe_screen object Note: we're not presently subclassing pipe_screen (no cell_screen) but that would be the place to put SPU thread/context info.
..
Definition at line 150 of file cell_screen.c.
References CALLOC_STRUCT, cell_destroy_screen(), cell_get_name(), cell_get_param(), cell_get_paramf(), cell_get_vendor(), cell_init_screen_texture_funcs(), cell_is_format_supported(), pipe_screen::destroy, pipe_screen::get_name, pipe_screen::get_param, pipe_screen::get_paramf, pipe_screen::get_vendor, pipe_screen::is_format_supported, and pipe_screen::winsys.
00151 { 00152 struct pipe_screen *screen = CALLOC_STRUCT(pipe_screen); 00153 00154 if (!screen) 00155 return NULL; 00156 00157 screen->winsys = winsys; 00158 00159 screen->destroy = cell_destroy_screen; 00160 00161 screen->get_name = cell_get_name; 00162 screen->get_vendor = cell_get_vendor; 00163 screen->get_param = cell_get_param; 00164 screen->get_paramf = cell_get_paramf; 00165 screen->is_format_supported = cell_is_format_supported; 00166 00167 cell_init_screen_texture_funcs(screen); 00168 00169 return screen; 00170 }
static void cell_destroy_screen | ( | struct pipe_screen * | screen | ) | [static] |
Definition at line 133 of file cell_screen.c.
References pipe_winsys::destroy, FREE, and pipe_screen::winsys.
00134 { 00135 struct pipe_winsys *winsys = screen->winsys; 00136 00137 if(winsys->destroy) 00138 winsys->destroy(winsys); 00139 00140 FREE(screen); 00141 }
static const char* cell_get_name | ( | struct pipe_screen * | screen | ) | [static] |
static int cell_get_param | ( | struct pipe_screen * | screen, | |
int | param | |||
) | [static] |
Definition at line 55 of file cell_screen.c.
References CELL_MAX_SAMPLERS, PIPE_CAP_ANISOTROPIC_FILTER, PIPE_CAP_GLSL, PIPE_CAP_MAX_RENDER_TARGETS, PIPE_CAP_MAX_TEXTURE_2D_LEVELS, PIPE_CAP_MAX_TEXTURE_3D_LEVELS, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS, PIPE_CAP_NPOT_TEXTURES, PIPE_CAP_OCCLUSION_QUERY, PIPE_CAP_POINT_SPRITE, PIPE_CAP_S3TC, PIPE_CAP_TEXTURE_SHADOW_MAP, and PIPE_CAP_TWO_SIDED_STENCIL.
00056 { 00057 switch (param) { 00058 case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS: 00059 return CELL_MAX_SAMPLERS; 00060 case PIPE_CAP_NPOT_TEXTURES: 00061 return 0; 00062 case PIPE_CAP_TWO_SIDED_STENCIL: 00063 return 0; 00064 case PIPE_CAP_GLSL: 00065 return 1; 00066 case PIPE_CAP_S3TC: 00067 return 0; 00068 case PIPE_CAP_ANISOTROPIC_FILTER: 00069 return 0; 00070 case PIPE_CAP_POINT_SPRITE: 00071 return 0; 00072 case PIPE_CAP_MAX_RENDER_TARGETS: 00073 return 1; 00074 case PIPE_CAP_OCCLUSION_QUERY: 00075 return 0; 00076 case PIPE_CAP_TEXTURE_SHADOW_MAP: 00077 return 0; 00078 case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: 00079 return 12; /* max 2Kx2K */ 00080 case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: 00081 return 8; /* max 128x128x128 */ 00082 case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: 00083 return 12; /* max 2Kx2K */ 00084 default: 00085 return 0; 00086 } 00087 }
static float cell_get_paramf | ( | struct pipe_screen * | screen, | |
int | param | |||
) | [static] |
Definition at line 91 of file cell_screen.c.
References PIPE_CAP_MAX_LINE_WIDTH, PIPE_CAP_MAX_LINE_WIDTH_AA, PIPE_CAP_MAX_POINT_WIDTH, PIPE_CAP_MAX_POINT_WIDTH_AA, PIPE_CAP_MAX_TEXTURE_ANISOTROPY, and PIPE_CAP_MAX_TEXTURE_LOD_BIAS.
00092 { 00093 switch (param) { 00094 case PIPE_CAP_MAX_LINE_WIDTH: 00095 /* fall-through */ 00096 case PIPE_CAP_MAX_LINE_WIDTH_AA: 00097 return 255.0; /* arbitrary */ 00098 00099 case PIPE_CAP_MAX_POINT_WIDTH: 00100 /* fall-through */ 00101 case PIPE_CAP_MAX_POINT_WIDTH_AA: 00102 return 255.0; /* arbitrary */ 00103 00104 case PIPE_CAP_MAX_TEXTURE_ANISOTROPY: 00105 return 0.0; 00106 00107 case PIPE_CAP_MAX_TEXTURE_LOD_BIAS: 00108 return 16.0; /* arbitrary */ 00109 00110 default: 00111 return 0; 00112 } 00113 }
static const char* cell_get_vendor | ( | struct pipe_screen * | screen | ) | [static] |
static boolean cell_is_format_supported | ( | struct pipe_screen * | screen, | |
enum pipe_format | format, | |||
enum pipe_texture_target | target, | |||
unsigned | tex_usage, | |||
unsigned | geom_flags | |||
) | [static] |
Definition at line 117 of file cell_screen.c.
References FALSE, PIPE_FORMAT_DXT5_RGBA, PIPE_FORMAT_R8G8B8A8_SRGB, and TRUE.
00122 { 00123 /* cell supports most formats, XXX for now anyway */ 00124 if (format == PIPE_FORMAT_DXT5_RGBA || 00125 format == PIPE_FORMAT_R8G8B8A8_SRGB) 00126 return FALSE; 00127 else 00128 return TRUE; 00129 }