Maniphest T81003

First image drawn with the Python gpu module may be black
Closed, ResolvedBUG

Assigned To
Clément Foucault (fclem)
Authored By
Inês Almeida (brita_)
Sep 20 2020, 7:19 PM
Tags
  • BF Blender
  • EEVEE & Viewport
  • Python API
Subscribers
Germano Cavalcante (mano-wii)
Inês Almeida (brita_)
Philipp Oeser (lichtwerk)

Description

System Information
Operating system: Linux-5.4.43-x86_64-Intel-R-_Core-TM-_i7-7500U_CPU_@_2.70GHz-with-slackware-14.2 64 Bits
Graphics card: Mesa Intel(R) HD Graphics 620 (KBL GT2) Intel 4.6 (Core Profile) Mesa 20.1.0

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-20 05:59, hash: rBf470a02afaea
Worked: version: 2.90.0 *Release*, branch: master, commit date: 2020-08-31 11:26, hash: rB0330d1af29c0
Caused by rBc766d9b9dc56: GPUTexture: GL Backend Isolation

Short description of error
When drawing images with the Python gpu module, the first image rendering command may produce a black image.

Exact steps for others to reproduce the error
See the attached .blend file.

  • if line 32 is commented, the error occurs
  • if line 32 is active (something is drawn beforehand), the error does not occur

Probably related: T80730: BGL deprecation

Revisions and Commits

rB Blender

Related Objects

Mentioned Here
rBc766d9b9dc56: GPUTexture: GL Backend Isolation
T80730: BGL deprecation
rB536c2e0ec916: GPUState: Only apply state before drawing

Event Timeline

Inês Almeida (brita_) created this task.Sep 20 2020, 7:19 PM
Inês Almeida (brita_) updated the task description.Sep 20 2020, 7:21 PM
Inês Almeida (brita_) updated the task description.Sep 20 2020, 7:24 PM
Inês Almeida (brita_) updated the task description.Sep 20 2020, 7:42 PM
Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Needs Information from User.Sep 24 2020, 5:14 PM
Germano Cavalcante (mano-wii) added a subscriber: Germano Cavalcante (mano-wii).

I cannot reproduce this with either the latest stable or current development versions of Blender.

However, I had to choose another image, since "Toad Sphere Render.png" had not been packed in the file.

Please try the latest daily build: https://builder.blender.org/download/

Go to File → Defaults → Load Factory Settings and then load your file to see if you still can reproduce this issue.

If the problem persists, please give us more clear instructions on how to reproduce it from scratch.

Inês Almeida (brita_) changed the task status from Needs Information from User to Needs Triage.Oct 3 2020, 12:11 PM

I have re-tested it in a build from today and the problem still persists for me.

The problem can be seen by commenting out line 32 of the script in the test file.
The particular image is not important.

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.EditedOct 7 2020, 10:54 AM
Philipp Oeser (lichtwerk) added projects: EEVEE & Viewport, Python API.
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

I can confirm [if commenting line 32].

Probably related: T80730: BGL deprecation

Philipp Oeser (lichtwerk) triaged this task as High priority.Oct 7 2020, 11:23 AM

Caused by rBc766d9b9dc56: GPUTexture: GL Backend Isolation

Philipp Oeser (lichtwerk) updated the task description.Oct 7 2020, 11:25 AM
Philipp Oeser (lichtwerk) updated the task description.
Clément Foucault (fclem) closed this task as Resolved by committing rBf12b0373f322: BGL: Workaround broken bgl usage caused by GPU refactor.Oct 8 2020, 4:38 PM
Clément Foucault (fclem) claimed this task.
Clément Foucault (fclem) added a commit: rBf12b0373f322: BGL: Workaround broken bgl usage caused by GPU refactor.