PDA

View Full Version : Crash in writing to AGP/Video mem



ToolTech
09-09-2002, 04:51 AM
I do get a crash at the 4:th time I fill the video mem allocated by wglAllocateMemoryNV. The memory is allocated once and not freed. I do reuse the allocated memory and copy data from CPU mem to that AGP mem.

I have flushed the memory by using FlushVertexArrayRangeNV before I refill the data ..

What's wrong ?

ToolTech
09-09-2002, 06:40 AM
I do get the crash when I do...

1. s_fastBuffer=(unsigned char *)wglAllocateMemoryNV(1048560,0,1,1);

// result 0x0bb80000

2. glVertexArrayRangeNV(1048560,s_fastBuffer);

3. memcpy(s_fastBuffer, vecBuffer, 786420);

whats wrong ?? I do get access violation in the memcpy (3) in writing to the allocated mem

Ysaneya
09-09-2002, 08:35 AM
Am i wrong, or isn't it supposed to be wglAllocateMemoryNV(1048560, 0, 0, 1) ?!

Using 0, 1, 1 doesn't sound safe, IMO.

Y.

ToolTech
09-09-2002, 09:06 AM
My Mistake !!

I modified the s_fastBuffer from another thread...

Sorry ;-)