On 1 January 2016 at 18:08, Józef Kucia jkucia@codeweavers.com wrote:
@@ -3989,6 +3989,17 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str TRACE("device %p, resource %p, sub_resource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n", device, resource, sub_resource_idx, box, data, row_pitch, depth_pitch);
- if (resource->type == WINED3D_RTYPE_BUFFER)
- {
struct wined3d_buffer *buffer = buffer_from_resource(resource);
HRESULT hr;
if (FAILED(hr = wined3d_buffer_upload_data(buffer, box, data)))
WARN("Failed to update buffer data, hr %#x.\n", hr);
return;
- }
Are the sub_resource_idx and row_pitch/depth_pitch parameters validated in any way for buffer resources?
On Sun, Jan 3, 2016 at 7:06 PM, Henri Verbeet hverbeet@gmail.com wrote:
Are the sub_resource_idx and row_pitch/depth_pitch parameters validated in any way for buffer resources?
The sub_resource_idx parameter is validated. I plan to add some tests when we have a support for buffer resources in CopyResource() or when buffer resources can be accessed in shaders.