All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [Bug 67215] New: UBO access seems to mask address on nouveau
Date: Tue, 23 Jul 2013 11:57:50 +0000	[thread overview]
Message-ID: <bug-67215-8800@http.bugs.freedesktop.org/> (raw)


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

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

          Priority: medium
            Bug ID: 67215
          Assignee: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
           Summary: UBO access seems to mask address on nouveau
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: wickmarkus-S0/GAf8tV78@public.gmane.org
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: git
         Component: Drivers/DRI/nouveau
           Product: Mesa

Hi,

The UBO support seems to be broken when used with dolphin-emu. To try it
yourself, I created an apitrace dump:
http://markus.members.selfnet.de/dolphin/dolphin-emu.trace (~48M)
This works fine on i965 and r600g, but it only show some random polygons on
nouveau.

This bug only happens when the uniform buffer is bigger than 64k bytes. More
precisely it happens when any read offset (related to buffer begin) goes above
the 64k mark.
The offset per uniform block is restricted to 64k, but the offsets per uniform
buffers should allow to access the complete memory.

It seems that the shader fetch mask locations to the first 64k bytes of the
buffer. To proove this, I moved the uniform block to offset 63k so that the
first 1k bytes are read correctly and everything else starts at zero.
My uniform buffer was 128k big and I copyed as I wanted to proove and I got a
correct rendering.

I think the mask is because of 16bit indices for uniform locations. This is
valid for uniform block offsets, but not for uniform buffer offsets.
eg:

u16 uniform_block_offset_per_variable; // hard coded in shader
u32 uniform_buffer_offset_per_uniform_block; // set by glBindBufferRange
u8* uniform_buffer_base; // location of this uniform buffer

// The way I think it's done:
u8* fetched_location = uniform_buffer_base +
u16(uniform_buffer_offset_per_uniform_block +
uniform_block_offset_per_variable);

// The correct way:
u8* fetched_location = uniform_buffer_base +
uniform_buffer_offset_per_uniform_block +
u32(uniform_block_offset_per_variable);

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

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

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

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

             reply	other threads:[~2013-07-23 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 11:57 bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ [this message]
     [not found] ` <bug-67215-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2013-07-24 19:08   ` [Bug 67215] UBO access seems to mask address on nouveau bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ

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-67215-8800@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon-cc+yj3umiyqdupfqwhejaq@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.