Commit 7296c976 authored by Hannes Domani's avatar Hannes Domani Committed by Jean-Baptiste Kempf

Direct3D9: release compile shader buffers

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0cee6c30
...@@ -1213,8 +1213,10 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source, ...@@ -1213,8 +1213,10 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source,
if (FAILED(hr)) { if (FAILED(hr)) {
msg_Warn(vd, "D3DXCompileShader Error (hr=0x%lX)", hr); msg_Warn(vd, "D3DXCompileShader Error (hr=0x%lX)", hr);
if (error_msgs) if (error_msgs) {
msg_Warn(vd, "HLSL Compilation Error: %s", (char*)ID3DXBuffer_GetBufferPointer(error_msgs)); msg_Warn(vd, "HLSL Compilation Error: %s", (char*)ID3DXBuffer_GetBufferPointer(error_msgs));
ID3DXBuffer_Release(error_msgs);
}
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -1222,6 +1224,11 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source, ...@@ -1222,6 +1224,11 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source,
ID3DXBuffer_GetBufferPointer(compiled_shader), ID3DXBuffer_GetBufferPointer(compiled_shader),
&sys->d3dx_shader); &sys->d3dx_shader);
if (compiled_shader)
ID3DXBuffer_Release(compiled_shader);
if (error_msgs)
ID3DXBuffer_Release(error_msgs);
if (FAILED(hr)) { if (FAILED(hr)) {
msg_Warn(vd, "IDirect3DDevice9_CreatePixelShader error (hr=0x%lX)", hr); msg_Warn(vd, "IDirect3DDevice9_CreatePixelShader error (hr=0x%lX)", hr);
return VLC_EGENERIC; return VLC_EGENERIC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment