Mesa (master): Revert "i915g: Don't bind 0-length programs"

Stephane Marchesin marcheu at kemper.freedesktop.org
Fri Oct 5 19:45:56 UTC 2012


Module: Mesa
Branch: master
Commit: 762ac0a218552d7861bdae350eaa3f2cd9241606
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=762ac0a218552d7861bdae350eaa3f2cd9241606

Author: Stéphane Marchesin <marcheu at chromium.org>
Date:   Fri Oct  5 12:43:49 2012 -0700

Revert "i915g: Don't bind 0-length programs"

This reverts commit 8c28a9bd733f5b51ab459c6bc626a5aaac5a6c0c.

---

 src/gallium/drivers/i915/i915_state_emit.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c
index 7b4b02e..590a1ba 100644
--- a/src/gallium/drivers/i915/i915_state_emit.c
+++ b/src/gallium/drivers/i915/i915_state_emit.c
@@ -370,11 +370,6 @@ validate_program(struct i915_context *i915, unsigned *batch_space)
 {
    uint additional_size = 0;
 
-   if (!i915->fs->program_len) {
-      *batch_space = 0;
-      return;
-   }
-
    additional_size += i915->current.target_fixup_format ? 3 : 0;
 
    /* we need more batch space if we want to emulate rgba framebuffers */
@@ -387,13 +382,12 @@ emit_program(struct i915_context *i915)
    uint additional_size = 0;
    uint i;
 
-   if (!i915->fs->program_len)
-      return;
-
    /* count how much additional space we'll need */
    validate_program(i915, &additional_size);
    additional_size -= i915->fs->decl_len + i915->fs->program_len;
 
+   /* we should always have, at least, a pass-through program */
+   assert(i915->fs->program_len > 0);
 
    /* output the declarations */
    {




More information about the mesa-commit mailing list