bugGNU Octave - Bugs: bug #54680, imagesc incomplete when using...

 
 

bug #54680: imagesc incomplete when using software rendering

Submitted by:  Muhali <muhali>
Submitted on:  Tue 18 Sep 2018 02:50:15 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Fri 08 Mar 2019 12:35:21 PM UTC, comment #13:

Ok, so I'll close this report and another one can be open if we want to support rendering very large images.

Pantxo Diribarne <pantxo>
Project Member
Fri 08 Mar 2019 12:16:04 PM UTC, comment #12:

@Pantxo: I think what the user would expect is some sort of downsampling (only using every n-th row/column). But nevertheless, just go ahead and close this.

Andreas Weber <andy1978>
Project Member
Fri 08 Mar 2019 08:08:16 AM UTC, comment #11:

@Andreas: Indeed we could fallback to using several textures. But if we are going to try to show very large images, we should first find a way to cache textures and avoid the time consuming texture creation.

As for only showing part of the image I think this doesn't look serious and would avoid this solution.

Pantxo Diribarne <pantxo>
Project Member
Fri 08 Mar 2019 07:07:50 AM UTC, comment #10:

Just my opinion:

I would show as much as possible (as it was before) and output the warning, which should include the string GL_MAX_TEXTURE_SIZE so the user is able to further search the issue.

Am I wrong or could the texture be split in several pieces and drawn sequentially?

Andreas Weber <andy1978>
Project Member
Thu 07 Mar 2019 09:01:59 PM UTC, comment #9:

I pushed the patch from comment #5 here:

http://hg.savannah.gnu.org/hgweb/octave/rev/ea4a36fd48b6

Can I close this report?

Pantxo Diribarne <pantxo>
Project Member
Thu 28 Feb 2019 09:01:12 AM UTC, comment #8:

In my previous post, "we would indeed fallback" should read "we could indeed fallback".

Pantxo Diribarne <pantxo>
Project Member
Thu 28 Feb 2019 08:59:30 AM UTC, comment #7:

In Octave 4.2 on windows, Octave used to rely on the native opengl implementation which may have higher GL_MAX_TEXTURE_SIZE, but only implements opengl 1.1 (which is clearly too old).

As for pcolor, it uses a surface object as you pointed out, and the rendering is thus very different: a quad primitive per pixel. This is much more expensive than simple pixel data and we cannot afford to use this approach for image objects. But we would indeed fallback to this approach when GL_MAX_TEXTURE_SIZE is exceeded.

Pantxo Diribarne <pantxo>
Project Member
Thu 28 Feb 2019 08:51:55 AM UTC, comment #6:

When doing:
A=rand(256, 2^15);
imagesc(A), shading interp, colormap gray

I do see the same behaviour on a WIN7 machine using 4.4.1 or 5.1.0 as described below. Interestingly though in 4.2, or using pcolor(A), shading interp, colormap gray eveything works as expected.

They use different drawing schemes (image vs surface) but I would assume the same OpenGL renderer to be involved.

Christoph Ellenberger <ellchr00>
Fri 15 Feb 2019 12:27:54 PM UTC, comment #5:

I attached a patch in which I took care of warning the user about the limitation. No partial image will be drawn.

(file #46274)

Pantxo Diribarne <pantxo>
Project Member
Mon 22 Oct 2018 07:06:37 PM UTC, comment #4:

Oh, this is really disappointing.

While debugging I found out that this is a duplicate of a bug I've filed 4 years ago:

https://savannah.gnu.org/bugs/?43873

Andreas Weber <andy1978>
Project Member
Fri 05 Oct 2018 02:43:51 PM UTC, comment #3:

I see the same but cropped around 16380 (I guess 2^14) but with hardware rendering (free radeon driver)

Andreas Weber <andy1978>
Project Member
Tue 18 Sep 2018 06:22:34 PM UTC, comment #2:

Also confirmed here with LIBGL_ALWAYS_SOFTWARE=1. It looks like it stops drawing about 8200, maybe 8192? When the zoom is changed to focus on the area around x=9000, the area that was white now appears shaded.

Mike Miller <mtmiller>
Project Administrator
Tue 18 Sep 2018 05:42:09 PM UTC, comment #1:

Confirm.
It appears the issue is due to software GL vs hardware GL.
I can trigger the same behavior by doing

LIBGL_ALWAYS_SOFTWARE=1 octave

on local machine.

I wonder if this is bug in Mesa llvmpipe driver.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 18 Sep 2018 02:50:15 PM UTC, original submission:

When I issue

imagesc(ones(10000, 1)')

directly on my local machine I get a normal full rectangle (local.png attached), but when done remotely via ssh my rectangle is cropped (remote.png).

Muhali <muhali>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #46274:  warn_large_image.patch added by pantxo (3KiB - text/x-patch)
file #45035:  local.png added by muhali (11KiB - image/png)
file #45036:  remote.png added by muhali (12KiB - image/png)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ellchr00 (Posted a comment)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by muhali (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-08 pantxo StatusDuplicate => Fixed
        Open/ClosedOpen => Closed
        Release4.4.1 => dev
    2019-02-15 pantxo Attached File- => Added warn_large_image.patch, #46274
    2018-10-22 andy1978 Dependencies- => Depends on bugs #43873
    2018-10-22 andy1978 StatusConfirmed => Duplicate
    2018-09-19 mtmiller Carbon-CopyRemoved 80942 => -
    2018-09-18 mtmiller CategoryNone => Plotting with OpenGL
        StatusNone => Confirmed
        Summaryimagesc incomplete => imagesc incomplete when using software rendering
    2018-09-18 muhali Attached File- => Added local.png, #45035
        Attached File- => Added remote.png, #45036

    Back to the top


    Powered by Savane 3.4