Lines Matching refs:buf
10 struct i915_sw_buffer *buf = CALLOC_STRUCT(i915_sw_buffer);
12 if (!buf)
15 buf->magic = 0xDEAD1337;
16 buf->type = type;
17 buf->ptr = CALLOC(size, 1);
19 if (!buf->ptr)
22 return (struct i915_winsys_buffer *)buf;
26 FREE(buf);
36 struct i915_sw_buffer *buf = CALLOC_STRUCT(i915_sw_buffer);
38 if (!buf)
41 buf->magic = 0xDEAD1337;
42 buf->type = type;
43 buf->ptr = CALLOC(*stride * height, 1);
44 buf->tiling = *tiling;
45 buf->stride = *stride;
47 if (!buf->ptr)
50 return (struct i915_winsys_buffer *)buf;
54 FREE(buf);
63 struct i915_sw_buffer *buf = i915_sw_buffer(buffer);
65 buf->map_count += 1;
66 return buf->ptr;
73 struct i915_sw_buffer *buf = i915_sw_buffer(buffer);
75 buf->map_count -= 1;
85 struct i915_sw_buffer *buf = i915_sw_buffer(buffer);
87 memcpy((char*)buf->ptr + offset, data, size);
95 struct i915_sw_buffer *buf = i915_sw_buffer(buffer);
98 buf->magic = 0;
101 FREE(buf->ptr);
102 FREE(buf);