All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 71723] New: [GLSL] Sampler arrays indexed with non-constant expressions
Date: Mon, 18 Nov 2013 07:20:55 +0000	[thread overview]
Message-ID: <bug-71723-502@http.bugs.freedesktop.org/> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1784 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=71723

          Priority: medium
            Bug ID: 71723
          Assignee: dri-devel@lists.freedesktop.org
           Summary: [GLSL] Sampler arrays indexed with non-constant
                    expressions
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: vluchits@gmail.com
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: 9.2
         Component: Drivers/DRI/Radeon
           Product: Mesa

Created attachment 89383
  --> https://bugs.freedesktop.org/attachment.cgi?id=89383&action=edit
Test vertex shader

Hello,

in my opinion GLSL compiler in mesa is too restrictive when it comes to sampler
arrays. The attached vertex shader can not be compiled due to the "sampler
arrays indexed with non-constant expressions is forbidden in GLSL 1.30 and
later":

Lines 159-136 of src/glsl/ast_array_index.cpp say:

    * This restriction was added in GLSL 1.30.  Shaders using earlier version
    * of the language should not be rejected by the compiler front-end for
    * using this construct.  This allows useful things such as using a loop
    * counter as the index to an array of samplers.  If the loop in unrolled,
    * the code should compile correctly.  Instead, emit a warning.

If compiler actually attempted to unroll the loop above, it would notice that
the code does compile correctly in that case. Instead it just emits and error
and, in my opinion, contradicts the comment above by not allowing the
aforementioned "useful thing".

Can the compiler be changed to _first_ attempt to unroll the loop and then
check for sampler array indices being constants?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3226 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2013-11-18  7:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-18  7:20 bugzilla-daemon [this message]
2013-11-18 12:51 ` [Bug 71723] Sampler arrays indexed with non-constant expressions bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-71723-502@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.