r300: Add texture stubs.

This commit is contained in:
Corbin Simpson 2009-01-22 16:51:34 -08:00
parent ecb7f29f74
commit 0648bc9f65
5 changed files with 94 additions and 1 deletions

View file

@ -11,7 +11,8 @@ C_SOURCES = \
r300_emit.c \
r300_screen.c \
r300_state.c \
r300_surface.c
r300_surface.c \
r300_texture.c
include ../../Makefile.template

View file

@ -113,12 +113,33 @@ static float r300_get_paramf(struct pipe_screen* pscreen, int param)
}
}
/* XXX moar formats */
static boolean check_tex_2d_format(enum pipe_format format)
{
switch (format) {
case PIPE_FORMAT_I8_UNORM:
return TRUE;
default:
break;
}
return FALSE;
}
/* XXX moar targets */
static boolean r300_is_format_supported(struct pipe_screen* pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned tex_usage,
unsigned geom_flags)
{
switch (target) {
case PIPE_TEXTURE_2D:
return check_tex_2d_format(format);
default:
break;
}
return FALSE;
}
@ -174,5 +195,7 @@ struct pipe_screen* r300_create_screen(struct pipe_winsys* winsys,
r300screen->screen.surface_map = r300_surface_map;
r300screen->screen.surface_unmap = r300_surface_unmap;
r300_init_screen_texture_functions(&r300screen->screen);
return &r300screen->screen;
}

View file

@ -28,6 +28,7 @@
#include "util/u_memory.h"
#include "r300_chipset.h"
#include "r300_texture.h"
#include "r300_winsys.h"
struct r300_screen {

View file

@ -0,0 +1,35 @@
/*
* Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "r300_texture.h"
/* Create a new texture. */
static struct pipe_texture*
r300_texture_create(struct pipe_screen* screen,
const struct pipe_texture* template)
{
}
void r300_init_screen_texture_functions(struct pipe_screen* screen)
{
screen->texture_create = r300_texture_create;
}

View file

@ -0,0 +1,33 @@
/*
* Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifndef R300_TEXTURE_H
#define R300_TEXTURE_H
#include "pipe/p_screen.h"
struct r300_texture {
};
void r300_init_screen_texture_functions(struct pipe_screen* screen);
#endif /* R300_TEXTURE_H */