~ubuntu-branches/ubuntu/lucid/mesa/lucid

« back to all changes in this revision

Viewing changes to src/gallium/winsys/drm/vmware/core/vmw_screen_pools.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen, Timo Aaltonen, Robert Hooker
  • Date: 2010-02-19 15:52:12 UTC
  • mfrom: (3.1.10 experimental)
  • Revision ID: james.westby@ubuntu.com-20100219155212-blqov938av7m6exj
Tags: 7.7-3ubuntu1
[ Timo Aaltonen ]
* Merge from Debian experimental.

[ Robert Hooker ]
* Add 100_no_abi_tag.patch: Removes the ABI tag in /usr/lib/libGL.so.1
  which prevented ldconfig from using a libGL from another directory
  at a higher priority than the one in /usr/lib.
* Install libGL alternatives with libgl1-mesa-swx11 as well. (LP: #522048)

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
      goto error;
54
54
 
55
55
   vws->pools.gmr_mm = mm_bufmgr_create(vws->pools.gmr,
56
 
                                        16*1024*1024,
 
56
                                        VMW_GMR_POOL_SIZE,
57
57
                                        12 /* 4096 alignment */);
58
58
   if(!vws->pools.gmr_mm)
59
59
      goto error;
60
60
 
 
61
   /*
 
62
    * GMR buffers are typically shortlived, but it's possible that at a given
 
63
    * instance a buffer is mapped. So to avoid stalling we tell pipebuffer to
 
64
    * forbid creation of buffers beyond half the GMR pool size,
 
65
    *
 
66
    * XXX: It is unclear weather we want to limit the total amount of temporary
 
67
    * malloc memory used to backup unvalidated GMR buffers. On one hand it is
 
68
    * preferrable to fail an allocation than exhausting the guest memory with
 
69
    * temporary data, but on the other hand it is possible that a stupid
 
70
    * application creates large vertex buffers and does not use them for a long
 
71
    * time -- since the svga pipe driver only emits the DMA uploads when a
 
72
    * buffer is used for drawing this would effectively disabling swapping GMR
 
73
    * buffers to memory. So far, the preemptively flush already seems to keep
 
74
    * total allocated memory within relatively small numbers, so we don't
 
75
    * limit.
 
76
    */
61
77
   vws->pools.gmr_fenced = fenced_bufmgr_create(
62
78
      vws->pools.gmr_mm,
63
 
      vmw_fence_ops_create(vws));
 
79
      vmw_fence_ops_create(vws),
 
80
      VMW_GMR_POOL_SIZE/2,
 
81
      ~0);
64
82
 
65
83
#ifdef DEBUG
66
84
   vws->pools.gmr_fenced = pb_debug_manager_create(vws->pools.gmr_fenced,