mirror of https://github.com/encounter/SDL.git
render: D3D9 doesn't need to check for stream offset support anymore.
We don't use offsets at all now. Too slow.
This commit is contained in:
parent
709f5ee417
commit
fcb4681336
|
@ -70,7 +70,6 @@ typedef struct
|
||||||
SDL_bool updateSize;
|
SDL_bool updateSize;
|
||||||
SDL_bool beginScene;
|
SDL_bool beginScene;
|
||||||
SDL_bool enableSeparateAlphaBlend;
|
SDL_bool enableSeparateAlphaBlend;
|
||||||
SDL_bool supportsStreamOffset;
|
|
||||||
D3DTEXTUREFILTERTYPE scaleMode[8];
|
D3DTEXTUREFILTERTYPE scaleMode[8];
|
||||||
IDirect3DSurface9 *defaultRenderTarget;
|
IDirect3DSurface9 *defaultRenderTarget;
|
||||||
IDirect3DSurface9 *currentRenderTarget;
|
IDirect3DSurface9 *currentRenderTarget;
|
||||||
|
@ -1199,7 +1198,6 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
||||||
}
|
}
|
||||||
|
|
||||||
/* upload the new VBO data for this set of commands. */
|
/* upload the new VBO data for this set of commands. */
|
||||||
if (data->supportsStreamOffset) {
|
|
||||||
vbo = data->vertexBuffers[vboidx];
|
vbo = data->vertexBuffers[vboidx];
|
||||||
if (!vbo || (data->vertexBufferSize[vboidx] < vertsize)) {
|
if (!vbo || (data->vertexBufferSize[vboidx] < vertsize)) {
|
||||||
const DWORD usage = D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY;
|
const DWORD usage = D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY;
|
||||||
|
@ -1233,10 +1231,7 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
||||||
if (data->currentVertexBuffer >= SDL_arraysize(data->vertexBuffers)) {
|
if (data->currentVertexBuffer >= SDL_arraysize(data->vertexBuffers)) {
|
||||||
data->currentVertexBuffer = 0;
|
data->currentVertexBuffer = 0;
|
||||||
}
|
}
|
||||||
}
|
} else if (!data->reportedVboProblem) {
|
||||||
}
|
|
||||||
|
|
||||||
if (!vbo && !data->reportedVboProblem) {
|
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "SDL failed to get a vertex buffer for this Direct3D 9 rendering batch!");
|
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "SDL failed to get a vertex buffer for this Direct3D 9 rendering batch!");
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Dropping back to a slower method.");
|
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Dropping back to a slower method.");
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "This might be a brief hiccup, but if performance is bad, this is probably why.");
|
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "This might be a brief hiccup, but if performance is bad, this is probably why.");
|
||||||
|
@ -1709,8 +1704,6 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
device_flags |= D3DCREATE_MULTITHREADED;
|
device_flags |= D3DCREATE_MULTITHREADED;
|
||||||
}
|
}
|
||||||
|
|
||||||
data->supportsStreamOffset = ((caps.DevCaps2 & D3DDEVCAPS2_STREAMOFFSET) == D3DDEVCAPS2_STREAMOFFSET);
|
|
||||||
|
|
||||||
result = IDirect3D9_CreateDevice(data->d3d, data->adapter,
|
result = IDirect3D9_CreateDevice(data->d3d, data->adapter,
|
||||||
D3DDEVTYPE_HAL,
|
D3DDEVTYPE_HAL,
|
||||||
pparams.hDeviceWindow,
|
pparams.hDeviceWindow,
|
||||||
|
|
Loading…
Reference in New Issue