summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/Makefile4
-rw-r--r--src/gallium/drivers/r300/r300_blit.c2
-rw-r--r--src/gallium/drivers/r300/r300_blit.h9
-rw-r--r--src/gallium/drivers/r300/r300_clear.c8
-rw-r--r--src/gallium/drivers/r300/r300_clear.h6
-rw-r--r--src/gallium/drivers/r300/r300_context.c4
-rw-r--r--src/gallium/drivers/r300/r300_context.h2
-rw-r--r--src/gallium/drivers/r300/r300_screen.c2
-rw-r--r--src/gallium/drivers/r300/r300_surface.h8
9 files changed, 38 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/Makefile b/src/gallium/drivers/r300/Makefile
index 918eb8e1c4..bce7dcbf3a 100644
--- a/src/gallium/drivers/r300/Makefile
+++ b/src/gallium/drivers/r300/Makefile
@@ -4,10 +4,12 @@ include $(TOP)/configs/current
LIBNAME = r300
C_SOURCES = \
+ r300_blit.c \
r300_clear.c \
r300_context.c \
r300_screen.c \
- r300_state.c
+ r300_state.c \
+ r300_surface.c
include ../../Makefile.template
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index c01855defa..5f5eba90c1 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -20,6 +20,8 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
+#include "r300_blit.h"
+
/* Does a "paint" into the specified rectangle.
* Returns 1 on success, 0 on error. */
int r300_fill_blit(struct r300_context* r300,
diff --git a/src/gallium/drivers/r300/r300_blit.h b/src/gallium/drivers/r300/r300_blit.h
index ac916ca062..698b00083a 100644
--- a/src/gallium/drivers/r300/r300_blit.h
+++ b/src/gallium/drivers/r300/r300_blit.h
@@ -23,10 +23,17 @@
#ifndef R300_BLIT_H
#define R300_BLIT_H
+#include "pipe/p_state.h"
+
+#include "radeon_reg.h"
+
+/* Forward declarations. */
+struct r300_context;
+
extern int r300_fill_blit(struct r300_context* r300,
unsigned cpp,
short dst_pitch,
- struct pipe_buffer *dst_buffer,
+ struct pipe_buffer* dst_buffer,
unsigned dst_offset,
short x, short y,
short w, short h,
diff --git a/src/gallium/drivers/r300/r300_clear.c b/src/gallium/drivers/r300/r300_clear.c
index f8f0e61931..fd28437aaa 100644
--- a/src/gallium/drivers/r300/r300_clear.c
+++ b/src/gallium/drivers/r300/r300_clear.c
@@ -20,10 +20,14 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
+#include "r300_clear.h"
+
/* This gets its own file because Intel's is in its own file.
* I assume there's a good reason. */
-void r300_clear(struct pipe_context* pipe, struct pipe_surface* ps, unsigned val)
+void r300_clear(struct pipe_context* pipe,
+ struct pipe_surface* ps,
+ unsigned color)
{
- pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
+ pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, color);
ps->status = PIPE_SURFACE_STATUS_DEFINED;
} \ No newline at end of file
diff --git a/src/gallium/drivers/r300/r300_clear.h b/src/gallium/drivers/r300/r300_clear.h
index 58ac0a875c..e24a0690c9 100644
--- a/src/gallium/drivers/r300/r300_clear.h
+++ b/src/gallium/drivers/r300/r300_clear.h
@@ -20,4 +20,8 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
-void r300_clear(struct pipe_context* pipe, struct pipe_surface* ps, unsigned val); \ No newline at end of file
+#include "pipe/p_context.h"
+
+void r300_clear(struct pipe_context* pipe,
+ struct pipe_surface* ps,
+ unsigned color);
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 7fde1404d9..21bee5beae 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -50,5 +50,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
struct radeon_cs_manager* csm = radeon_cs_manager_gem_ctor(fd);
r300->cs = cs_gem_create(csm, 64 * 1024 / 4); */
+ r300_init_surface_functions(r300);
+
return &r300->context;
-} \ No newline at end of file
+}
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index f67823aa1e..ae2dab13ff 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -25,6 +25,8 @@
#include "pipe/p_context.h"
+#include "r300_surface.h"
+
struct r300_context {
/* Parent class */
struct pipe_context context;
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 9c89623df3..0a114bbc06 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -119,7 +119,7 @@ static void* r300_surface_map(struct pipe_screen* screen,
struct pipe_surface* surface,
unsigned flags)
{
- /* XXX is this all we need to do here? */
+ /* XXX this is not quite right */
char* map = pipe_buffer_map(screen, surface->buffer, flags);
if (!map) {
diff --git a/src/gallium/drivers/r300/r300_surface.h b/src/gallium/drivers/r300/r300_surface.h
index 3e3d813d99..29858eb541 100644
--- a/src/gallium/drivers/r300/r300_surface.h
+++ b/src/gallium/drivers/r300/r300_surface.h
@@ -23,6 +23,14 @@
#ifndef R300_SURFACE_H
#define R300_SURFACE_H
+#include "pipe/p_context.h"
+#include "pipe/p_screen.h"
+
+#include "util/u_rect.h"
+
#include "r300_blit.h"
+#include "r300_context.h"
+
+void r300_init_surface_functions(struct r300_context* r300);
#endif /* R300_SURFACE_H */