~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/gallium/drivers/r600/r600_resource.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-08-23 15:37:30 UTC
  • mfrom: (1.7.6)
  • Revision ID: package-import@ubuntu.com-20120823153730-c499sefj7btu4386
Tags: 9.0~git20120821.c1114c61-0ubuntu1
* Merge from unreleased debian git.
  - Includes support for ATI Trinity PCI IDs (LP: #1009089)
* rules, control, libgl1-mesa-swx11*: Remove swx11 support.
* Refresh patches:
  - drop 115_llvm_dynamic_linking.diff,
    117_nullptr_check_in_query_version.patch, and
    118_glsl_initialize_samplers.patch, all upstream
  - disable 116_use_shared_galliumcore.diff until it's reviewed and
    reworked to apply
* not-installed, libegl1-mesa-drivers-install.linux.in: Updated to
  match the single-pass build.
* libgl1-mesa-dri.*install.in: Drop libglsl.so, it's included in
  libdricore.so now.
* rules: Don't disable GLU on the common flags, we need to build it
  on the dri target.
* libglu*install.in: Fix the source file paths to match the build target.
  Drop the static lib from -dev since only shared libs get built.
* libgl1-mesa-dev.install.in: Fix the source file paths to match the
  build target.
* libgl1-mesa-dri.install.linux.in: Don't try to install libgallium.so,
  which isn't built yet.
* rules: Enable llvmpipe on armhf to see if it works or not.
* rules: Remove bin/install-sh on clean, and don't create a symlink for
  it.
* control: Add Pre-Depends on dpkg-dev due to the binaries using xz
  compression.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
                                                const struct pipe_resource *templ)
28
28
{
29
29
        if (templ->target == PIPE_BUFFER) {
30
 
                return r600_buffer_create(screen, templ);
 
30
                if (templ->bind & PIPE_BIND_GLOBAL) {
 
31
                    return r600_compute_global_buffer_create(screen, templ);
 
32
                }
 
33
                else {
 
34
                    return r600_buffer_create(screen, templ);
 
35
                }
31
36
        } else {
32
37
                return r600_texture_create(screen, templ);
33
38
        }
44
49
        }
45
50
}
46
51
 
 
52
void r600_resource_destroy(struct pipe_screen *screen, struct pipe_resource *res)
 
53
{
 
54
        if (res->target == PIPE_BUFFER && (res->bind & PIPE_BIND_GLOBAL)) {
 
55
                r600_compute_global_buffer_destroy(screen, res);
 
56
        } else {
 
57
                u_resource_destroy_vtbl(screen, res);
 
58
        }
 
59
}
 
60
 
47
61
void r600_init_screen_resource_functions(struct pipe_screen *screen)
48
62
{
49
63
        screen->resource_create = r600_resource_create;
50
64
        screen->resource_from_handle = r600_resource_from_handle;
51
65
        screen->resource_get_handle = u_resource_get_handle_vtbl;
52
 
        screen->resource_destroy = u_resource_destroy_vtbl;
53
 
        screen->user_buffer_create = r600_user_buffer_create;
 
66
        screen->resource_destroy = r600_resource_destroy;
54
67
}
55
68
 
56
 
void r600_init_context_resource_functions(struct r600_pipe_context *r600)
 
69
void r600_init_context_resource_functions(struct r600_context *r600)
57
70
{
58
71
        r600->context.get_transfer = u_get_transfer_vtbl;
59
72
        r600->context.transfer_map = u_transfer_map_vtbl;
60
 
        r600->context.transfer_flush_region = u_transfer_flush_region_vtbl;
 
73
        r600->context.transfer_flush_region = u_default_transfer_flush_region;
61
74
        r600->context.transfer_unmap = u_transfer_unmap_vtbl;
62
75
        r600->context.transfer_destroy = u_transfer_destroy_vtbl;
63
 
        r600->context.transfer_inline_write = u_transfer_inline_write_vtbl;
 
76
        r600->context.transfer_inline_write = u_default_transfer_inline_write;
64
77
}