Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render GBRP10 in opengl client #2828

Closed
totaam opened this issue Jul 7, 2020 · 7 comments
Closed

render GBRP10 in opengl client #2828

totaam opened this issue Jul 7, 2020 · 7 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 7, 2020

Split from #1462

@totaam
Copy link
Collaborator Author

totaam commented Jul 7, 2020

Issues:

  • opengl rendering is probably OK, but it would be nice to do the bitshift using the shader (tweak RGBP2RGB_SHADER?) - see Colour bit-wise shift in OpenGL shader GLSL
  • first frame looks OK, but then everything goes garbled

@totaam
Copy link
Collaborator Author

totaam commented Jul 10, 2020

2020-07-10 09:25:15: antoine uploaded file 10-bit-render.patch (8.6 KiB)

almost works

@totaam
Copy link
Collaborator Author

totaam commented Jul 10, 2020

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?)

@totaam
Copy link
Collaborator Author

totaam commented Jul 11, 2020

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.

@totaam
Copy link
Collaborator Author

totaam commented Jul 11, 2020

For non-opengl client, see #2839.

@totaam
Copy link
Collaborator Author

totaam commented Jul 11, 2020

2020-07-11 18:00:02: antoine uploaded file hack-r210.patch (1.8 KiB)

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

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2020

Correctly fixed in r26960: we have to use a csc step to convert to [r210](../commit/8875e19d8d67a1e2eeb8f189c9b1d526bd1d0e44).

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant