~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/gallium/drivers/r600/r600_screen.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2010 Jerome Glisse <glisse@freedesktop.org>
 
3
 *
 
4
 * Permission is hereby granted, free of charge, to any person obtaining a
 
5
 * copy of this software and associated documentation files (the "Software"),
 
6
 * to deal in the Software without restriction, including without limitation
 
7
 * on the rights to use, copy, modify, merge, publish, distribute, sub
 
8
 * license, and/or sell copies of the Software, and to permit persons to whom
 
9
 * the Software is furnished to do so, subject to the following conditions:
 
10
 *
 
11
 * The above copyright notice and this permission notice (including the next
 
12
 * paragraph) shall be included in all copies or substantial portions of the
 
13
 * Software.
 
14
 *
 
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 
18
 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
 
19
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 
20
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 
21
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 
22
 */
 
23
#ifndef R600_SCREEN_H
 
24
#define R600_SCREEN_H
 
25
 
 
26
#include <pipe/p_state.h>
 
27
#include <pipe/p_screen.h>
 
28
#include <pipebuffer/pb_buffer.h>
 
29
#include <xf86drm.h>
 
30
#include <radeon_drm.h>
 
31
#include "radeon.h"
 
32
#include "util/u_transfer.h"
 
33
#include "r600_resource.h"
 
34
 
 
35
/* Texture transfer. */
 
36
struct r600_transfer {
 
37
        /* Base class. */
 
38
        struct pipe_transfer            transfer;
 
39
        /* Buffer transfer. */
 
40
        struct pipe_transfer            *buffer_transfer;
 
41
        unsigned                        offset;
 
42
        struct pipe_resource            *linear_texture;
 
43
};
 
44
 
 
45
enum chip_class {
 
46
        R600,
 
47
        R700,
 
48
        EVERGREEN,
 
49
};
 
50
 
 
51
struct r600_screen {
 
52
        struct pipe_screen              screen;
 
53
        struct radeon                   *rw;
 
54
        enum chip_class                 chip_class;
 
55
        boolean use_mem_constant;
 
56
};
 
57
 
 
58
static INLINE struct r600_screen *r600_screen(struct pipe_screen *screen)
 
59
{
 
60
        return (struct r600_screen*)screen;
 
61
}
 
62
 
 
63
/* Buffer functions. */
 
64
struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
 
65
                                         const struct pipe_resource *templ);
 
66
struct pipe_resource *r600_user_buffer_create(struct pipe_screen *screen,
 
67
                                              void *ptr, unsigned bytes,
 
68
                                              unsigned bind);
 
69
unsigned r600_buffer_is_referenced_by_cs(struct pipe_context *context,
 
70
                                         struct pipe_resource *buf,
 
71
                                         unsigned face, unsigned level);
 
72
struct pipe_resource *r600_buffer_from_handle(struct pipe_screen *screen,
 
73
                                              struct winsys_handle *whandle);
 
74
 
 
75
/* r600_texture.c texture transfer functions. */
 
76
struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
 
77
                                                struct pipe_resource *texture,
 
78
                                                struct pipe_subresource sr,
 
79
                                                unsigned usage,
 
80
                                                const struct pipe_box *box);
 
81
void r600_texture_transfer_destroy(struct pipe_context *ctx,
 
82
                                   struct pipe_transfer *trans);
 
83
void* r600_texture_transfer_map(struct pipe_context *ctx,
 
84
                                struct pipe_transfer* transfer);
 
85
void r600_texture_transfer_unmap(struct pipe_context *ctx,
 
86
                                 struct pipe_transfer* transfer);
 
87
int r600_texture_scissor(struct pipe_context *ctx, struct r600_resource_texture *rtexture, unsigned level);
 
88
int r600_texture_cb(struct pipe_context *ctx, struct r600_resource_texture *rtexture, unsigned cb, unsigned level);
 
89
int r600_texture_db(struct pipe_context *ctx, struct r600_resource_texture *rtexture, unsigned level);
 
90
int r600_texture_from_depth(struct pipe_context *ctx, struct r600_resource_texture *rtexture, unsigned level);
 
91
int r600_texture_viewport(struct pipe_context *ctx, struct r600_resource_texture *rtexture, unsigned level);
 
92
 
 
93
/* r600_blit.c */
 
94
int r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *rtexture, unsigned level);
 
95
 
 
96
/* helpers */
 
97
int r600_conv_pipe_format(unsigned pformat, unsigned *format);
 
98
int r600_conv_pipe_prim(unsigned pprim, unsigned *prim);
 
99
 
 
100
void r600_init_screen_texture_functions(struct pipe_screen *screen);
 
101
 
 
102
#endif