Questions tagged [tearing]

An issue with operations on 64 bit value not being atomic on 32 bit machines

On 32 bit machines, only 32 bits are written at a time.

If you are writing a 64 bit value on a 32 bit machine, and writing to the same address at the same time on two different threads, you actually have four writes, not two, because the writes are done 32 bits at a time.

It is therefore possible for the threads to race, and when the smoke clears the variable contains the top 32 bits written by one thread, and the bottom 32 bits written by the other. So you can write 0xDEADBEEF00000000 on one thread and 0x00000000BAADF00D on another, and end up with 0x0000000000000000 in memory.

See this question for a code sample displaying tearing in C#.

39 questions
2
votes
2 answers

OpenGL tearing with fullscreen native resolution

I've got an OpenGL application with win32 api without glut etc...and I run into a problem with screen tearing in fullscreen. Basicly I have set WS_POPUP as a window style and resolution of my monitor as window size. I'm running on AMD radeon HD 7770…
ProXicT
  • 1,903
  • 3
  • 22
  • 46
2
votes
0 answers

Screen Tearing in GDI

I have a C/C++ MFC application where a moving image from left to right displays with StretchDIBits in a window. And the screen tearing happens in the window. Please understand I am not talking about flickering but screen tearing as flickering is…
Tae-Sung Shin
  • 20,215
  • 33
  • 138
  • 240
2
votes
1 answer

OpenGL window systems screen tearing prevention

in my OpenGL application I want to prevent screen tearing for obvious reasons. So far I have been using vsync. But I would like to replace it with a page flipping buffer swap (changing a pointer to the monitor's data instead of changing the value)…
SIGKILL
  • 390
  • 1
  • 9
2
votes
1 answer

Tearing in my animation on WinForms C#

I am using a library in which enables me to animate movement of WinForm elements (linked below), when I use it to move a transparent panel across the form (which has a picture background) there is an extraordinary amount of tearing. I believe the…
Dibesjr
  • 496
  • 3
  • 12
1
vote
2 answers

Extreme tearing when I move the camera quickly

I am creating a minecraft clone, and whenever I move the camera even a little bit fast there is a big tear between the chunks as shown here: Each chunk is 32x32x32 cubes and has a single vertex buffer for each kind of cube, in case it matters. I am…
Bill Sambrone
  • 4,334
  • 4
  • 48
  • 70
1
vote
0 answers

Kubundu 20.04 switching between Intel and Nvidia GPU

I just did a clean install of Kubuntu 20.04 (was previously running Kubuntu 19.10) on my "PC Specialist Defiance 2" laptop, which is a rebranded Clevo: $ sudo dmidecode | grep -iA9 'system info' System Information Manufacturer: PC Specialist…
Scott Deagan
  • 331
  • 3
  • 8
1
vote
1 answer

Is struct tearing an issue for Memory?

First things first: I know what Span and Memory are I know why Span must reside on the Stack only I (conceptionally) know what struct tearing is What remains unclear to me: Isn't struct tearing also an issue for Memory? As far as I…
Peter Wurzinger
  • 391
  • 2
  • 9
1
vote
1 answer

Huge image tearing / disappearing on extreme scaling

I have a big image of 7589x5537 that I put in a scene as a QPixmapGraphicsItem. If I scale the QGraphicsView to 14.2318 and rotate it -35 degrees, the render of the pixmap starts behaving weirdly; tearing or completely disappearing. This happens…
quimnuss
  • 1,503
  • 2
  • 17
  • 37
1
vote
1 answer

Why does this website cause tearing in IE?

http://gaxweb.eu/deploy/phenix/en-de/products?target=1340 I've got a weird IE bug here that causes tearing if you scroll that carousel with your mousewheel for example. The images are being torn into 2 parts, just like tearing in 3D games when you…
DanMan
  • 11,323
  • 4
  • 40
  • 61
1
vote
2 answers

MipMapping problems in OpenGL

I'm loading 3D objects (obj or 3ds or collada files) into my openGL application. The 3 environment is quite large (a few hundred metres in all axis'). My problem is that smaller 3D objects (i.e. in the order of ~< 1-2m ) don't appear to be…
Sonoman
  • 3,379
  • 9
  • 45
  • 61
1
vote
1 answer

Awesome window manager has horizontal tearing?

so i am having an issue with awesome (running Debian but doesn't matter because it does this on all my hardware). video gets ripples along the middle(vlc and mplayer and totem), scrolling no matter what app. never really cared much until i switched…
Julian
  • 19
  • 7
1
vote
0 answers

OpenGL ES iOS tearing/flickering

I've looked around and none of the fixes for this type of issue is working on my particular OpenGL app. The problem is I get some type of artifacts/tearing/flickering on the model I'm rendering. The model is built up of small squares next to each…
user614273
  • 74
  • 10
1
vote
1 answer

JPanel tearing even though I double buffer?

EDIT: This is an SSCCE to demonstrate my problem. import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Image; import java.awt.Point; import java.awt.event.ActionEvent; import…
Iain
  • 41
  • 9
0
votes
0 answers

Delphi - synhronize BitBlt with vsync (screen tearing)

I've some problem with my Delphi (10.4) application, and I'm stuck for a few days now. So I hope someone can help me. I'm rewriting some old code. Basically, I've a problem with BitBlt command and screen tearing. My code is drawing some .bmp images…
brane
  • 41
  • 6
0
votes
2 answers

Java 2D page-flipping on Linux

Our Java 2D application exhibits screen tearing when run on Linux. It does not exhibit any tearing when running on Windows. We've spent significant time analyzing our code, and haven't yet found a cause there. While I'm never one to decide that…
Matt
  • 2,187
  • 1
  • 16
  • 23