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

« back to all changes in this revision

Viewing changes to src/gallium/drivers/svga/svga_cmd.c

  • 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:
31
31
 */
32
32
 
33
33
#include "svga_winsys.h"
34
 
#include "svga_screen_buffer.h"
35
 
#include "svga_screen_texture.h"
 
34
#include "svga_resource_buffer.h"
 
35
#include "svga_resource_texture.h"
 
36
#include "svga_surface.h"
36
37
#include "svga_cmd.h"
37
38
 
38
39
/*
66
67
      id->mipmap = s->real_level;
67
68
   }
68
69
   else {
69
 
      id->sid = SVGA3D_INVALID_ID;
 
70
      swc->surface_relocation(swc, &id->sid, NULL, flags);
70
71
      id->face = 0;
71
72
      id->mipmap = 0;
72
73
   }
279
280
   if(!cmd)
280
281
      return PIPE_ERROR_OUT_OF_MEMORY;
281
282
 
282
 
   swc->surface_relocation(swc, &cmd->sid, sid, PIPE_BUFFER_USAGE_GPU_WRITE);
 
283
   swc->surface_relocation(swc, &cmd->sid, sid, SVGA_RELOC_WRITE);
283
284
   cmd->surfaceFlags = flags;
284
285
   cmd->format = format;
285
286
 
365
366
   if(!cmd)
366
367
      return PIPE_ERROR_OUT_OF_MEMORY;
367
368
   
368
 
   swc->surface_relocation(swc, &cmd->sid, sid, PIPE_BUFFER_USAGE_GPU_READ);
 
369
   swc->surface_relocation(swc, &cmd->sid, sid, SVGA_RELOC_READ);
369
370
   swc->commit(swc);;
370
371
   
371
372
   return PIPE_OK;
423
424
                  const SVGA3dCopyBox *boxes,       // IN
424
425
                  uint32 numBoxes)                  // IN
425
426
{
426
 
   struct svga_texture *texture = svga_texture(st->base.texture); 
 
427
   struct svga_texture *texture = svga_texture(st->base.resource); 
427
428
   SVGA3dCmdSurfaceDMA *cmd;
428
429
   SVGA3dCmdSurfaceDMASuffix *pSuffix;
429
430
   uint32 boxesSize = sizeof *boxes * numBoxes;
431
432
   unsigned surface_flags;
432
433
   
433
434
   if(transfer == SVGA3D_WRITE_HOST_VRAM) {
434
 
      region_flags = PIPE_BUFFER_USAGE_GPU_READ;
435
 
      surface_flags = PIPE_BUFFER_USAGE_GPU_WRITE;
 
435
      region_flags = SVGA_RELOC_READ;
 
436
      surface_flags = SVGA_RELOC_WRITE;
436
437
   }
437
438
   else if(transfer == SVGA3D_READ_HOST_VRAM) {
438
 
      region_flags = PIPE_BUFFER_USAGE_GPU_WRITE;
439
 
      surface_flags = PIPE_BUFFER_USAGE_GPU_READ;
 
439
      region_flags = SVGA_RELOC_WRITE;
 
440
      surface_flags = SVGA_RELOC_READ;
440
441
   }
441
442
   else {
442
443
      assert(0);
454
455
   cmd->guest.pitch = st->base.stride;
455
456
 
456
457
   swc->surface_relocation(swc, &cmd->host.sid, texture->handle, surface_flags);
457
 
   cmd->host.face = st->base.face; /* PIPE_TEX_FACE_* and SVGA3D_CUBEFACE_* match */
458
 
   cmd->host.mipmap = st->base.level;
 
458
   cmd->host.face = st->base.sr.face; /* PIPE_TEX_FACE_* and SVGA3D_CUBEFACE_* match */
 
459
   cmd->host.mipmap = st->base.sr.level;
459
460
 
460
461
   cmd->transfer = transfer;
461
462
 
489
490
   unsigned surface_flags;
490
491
   
491
492
   if(transfer == SVGA3D_WRITE_HOST_VRAM) {
492
 
      region_flags = PIPE_BUFFER_USAGE_GPU_READ;
493
 
      surface_flags = PIPE_BUFFER_USAGE_GPU_WRITE;
 
493
      region_flags = SVGA_RELOC_READ;
 
494
      surface_flags = SVGA_RELOC_WRITE;
494
495
   }
495
496
   else if(transfer == SVGA3D_READ_HOST_VRAM) {
496
 
      region_flags = PIPE_BUFFER_USAGE_GPU_WRITE;
497
 
      surface_flags = PIPE_BUFFER_USAGE_GPU_READ;
 
497
      region_flags = SVGA_RELOC_WRITE;
 
498
      surface_flags = SVGA_RELOC_READ;
498
499
   }
499
500
   else {
500
501
      assert(0);
584
585
 
585
586
   cmd->type = type;
586
587
 
587
 
   surface_to_surfaceid(swc, surface, &cmd->target, PIPE_BUFFER_USAGE_GPU_WRITE);
 
588
   surface_to_surfaceid(swc, surface, &cmd->target, SVGA_RELOC_WRITE);
588
589
 
589
590
   swc->commit(swc);
590
591
 
1000
1001
   if(!cmd)
1001
1002
      return PIPE_ERROR_OUT_OF_MEMORY;
1002
1003
 
1003
 
   surface_to_surfaceid(swc, src, &cmd->src, PIPE_BUFFER_USAGE_GPU_READ);
1004
 
   surface_to_surfaceid(swc, dest, &cmd->dest, PIPE_BUFFER_USAGE_GPU_WRITE);
 
1004
   surface_to_surfaceid(swc, src, &cmd->src, SVGA_RELOC_READ);
 
1005
   surface_to_surfaceid(swc, dest, &cmd->dest, SVGA_RELOC_WRITE);
1005
1006
   *boxes = (SVGA3dCopyBox*) &cmd[1];
1006
1007
 
1007
1008
   memset(*boxes, 0, boxesSize);
1043
1044
   if(!cmd)
1044
1045
      return PIPE_ERROR_OUT_OF_MEMORY;
1045
1046
 
1046
 
   surface_to_surfaceid(swc, src, &cmd->src, PIPE_BUFFER_USAGE_GPU_READ);
1047
 
   surface_to_surfaceid(swc, dest, &cmd->dest, PIPE_BUFFER_USAGE_GPU_WRITE);
 
1047
   surface_to_surfaceid(swc, src, &cmd->src, SVGA_RELOC_READ);
 
1048
   surface_to_surfaceid(swc, dest, &cmd->dest, SVGA_RELOC_WRITE);
1048
1049
   cmd->boxSrc = *boxSrc;
1049
1050
   cmd->boxDest = *boxDest;
1050
1051
   cmd->mode = mode;
1373
1374
   cmd->type = type;
1374
1375
 
1375
1376
   swc->region_relocation(swc, &cmd->guestResult, buffer, 0,
1376
 
                          PIPE_BUFFER_USAGE_GPU_WRITE);
 
1377
                          SVGA_RELOC_WRITE);
1377
1378
 
1378
1379
   swc->commit(swc);
1379
1380
   
1420
1421
   cmd->type = type;
1421
1422
   
1422
1423
   swc->region_relocation(swc, &cmd->guestResult, buffer, 0,
1423
 
                          PIPE_BUFFER_USAGE_GPU_WRITE);
 
1424
                          SVGA_RELOC_WRITE);
1424
1425
 
1425
1426
   swc->commit(swc);
1426
1427