summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Sindholt <[email protected]>2009-08-28 20:05:52 +0200
committerJoakim Sindholt <[email protected]>2009-08-28 20:05:52 +0200
commitdbe58d7f9f48ba57d5c56265bc5a6dce0dfa11b0 (patch)
treee6bc845b29a59a3e7bca40d28659a18644e8c002 /src
parent1e9eb69f835e35116b8ada0fc2f05561fd8956d1 (diff)
r300g: pretty up the new drm code a bit
As it turns out, I made some boners. This corrects them (I hope)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_drm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.c b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
index 85dfd82ed4d..47376a0f07b 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
@@ -26,6 +26,7 @@
/*
* Authors:
* Corbin Simpson <[email protected]>
+ * Joakim Sindholt <[email protected]>
*/
#include "radeon_drm.h"
@@ -33,7 +34,7 @@
/* Create a pipe_screen. */
struct pipe_screen* radeon_create_screen(struct drm_api* api,
int drmFB,
- struct drm_create_screen_arg *arg)
+ struct drm_create_screen_arg *arg)
{
struct radeon_winsys* winsys = radeon_pipe_winsys(drmFB);
@@ -107,12 +108,10 @@ radeon_texture_from_shared_handle(struct drm_api *api,
{
struct pipe_buffer *buffer;
- buffer = radeon_buffer_from_handle(api,
- screen,
- name,
- handle);
- if (!buffer)
+ buffer = radeon_buffer_from_handle(api, screen, name, handle);
+ if (!buffer) {
return NULL;
+ }
return screen->texture_blanket(screen, templ, &stride, buffer);
}
@@ -126,7 +125,8 @@ boolean radeon_shared_handle_from_texture(struct drm_api *api,
int retval, fd;
struct drm_gem_flink flink;
struct radeon_pipe_buffer* radeon_buffer;
- if (!radeon_buffer_from_texture(api, texture, (struct pipe_buffer **)&radeon_buffer, stride)) {
+ struct pipe_buffer* buffer = &radeon_buffer->base;
+ if (!radeon_buffer_from_texture(api, texture, buffer, stride)) {
return FALSE;
}