xpra icon
Bug tracker and wiki

Opened 2 months ago

Closed 2 months ago

#2828 closed task (fixed)

render GBRP10 in opengl client

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 4.1
Component: client Version: 3.0.x
Keywords: Cc:

Description

Split from #1462

Attachments (2)

10-bit-render.patch (8.6 KB) - added by Antoine Martin 2 months ago.
almost works
hack-r210.patch (1.8 KB) - added by Antoine Martin 2 months ago.
more correct handling of 10-bit data (hacked: free memleak included)

Download all attachments as: .zip

Change History (7)

comment:1 Changed 2 months ago by Antoine Martin

Status: newassigned

Issues:

  • opengl rendering is probably OK, but it would be nice to do the bitshift using the shader (tweak RGBP2RGB_SHADER?)
  • first frame looks OK, but then everything goes garbled
Version 0, edited 2 months ago by Antoine Martin (next)

Changed 2 months ago by Antoine Martin

Attachment: 10-bit-render.patch added

almost works

comment:2 Changed 2 months ago by Antoine Martin

Pretty much working as of r26945, just needs:

  • 10-bit windows sometimes render with the same repeated pattern, 4 times over - some alignment problem?
  • the byte-swapping code is super-slow, as it's done using a bytearray in python - should use cython and read / write longs at a time?
  • window icons? (also use 30-bit?)
Last edited 2 months ago by Antoine Martin (previous) (diff)

comment:3 Changed 2 months ago by Antoine Martin

The official OpenGL documentation on https://www.khronos.org/opengl/wiki/Pixel_Transfer says glPixelStore: GL_UNPACK_SWAP_BYTES has no effect on the memory order of components within a pixel, only on the order of bytes within components or indices.
It wasn't clear to me that this would do the byteswap for GL_UNSIGNED_SHORT, but it does. Problem solved!
r26948 replaces the slow byte-swapping code with glPixelStorei(GL_UNPACK_SWAP_BYTES, True) for BGR48 only.

Last edited 2 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 2 months ago by Antoine Martin

For non-opengl client, see #2839.

Changed 2 months ago by Antoine Martin

Attachment: hack-r210.patch added

more correct handling of 10-bit data (hacked: free memleak included)

comment:5 Changed 2 months ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Correctly fixed in r26960: we have to use a csc step to convert to r210.

It might be possible to bit-shift GBRP10 to GBRP16 using a shader, but this is beyond me.

Note: See TracTickets for help on using tickets.