summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2012-03-02 15:34:45 -0800
committerIan Romanick <ian.d.romanick@intel.com>2012-05-17 22:13:49 -0700
commit5696077656299d8617d4e71efcc5f8b0632a969c (patch)
tree852bd71e0415371b4d8e5b78b997839b0a9edef2
parent815d6e3f2f6c48104268195b7d48976d189b9d30 (diff)
i915: Compute maximum number of verts using the actual batchbuffer size.
We were looking at the size of batch.map for how big the batchbuffer was, but on 865 we just use a single-page batchbuffer due to hardware limits. v2: Removed check for sizeof map < bo->size, since that's always false. [change by anholt] NOTE: This is a candidate for release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41495 (cherry picked from commit 024ece7523f1735d2fca0067c0a3bdcf53fde8f9)
-rw-r--r--src/mesa/drivers/dri/i915/intel_render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_render.c b/src/mesa/drivers/dri/i915/intel_render.c
index a4041bea9ba..6afd7388e1e 100644
--- a/src/mesa/drivers/dri/i915/intel_render.c
+++ b/src/mesa/drivers/dri/i915/intel_render.c
@@ -125,9 +125,9 @@ static INLINE GLuint intel_get_vb_max(struct intel_context *intel)
{
GLuint ret;
- if (intel->intelScreen->no_vbo)
- ret = sizeof(intel->batch.map) - INTEL_NO_VBO_STATE_RESERVED;
- else
+ if (intel->intelScreen->no_vbo) {
+ ret = intel->batch.bo->size - INTEL_NO_VBO_STATE_RESERVED;
+ } else
ret = INTEL_VB_SIZE;
ret /= (intel->vertex_size * 4);
return ret;