diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c
index 7621020..ce3645f 100644
--- a/cursor/wayland-cursor.c
+++ b/cursor/wayland-cursor.c
@@ -152,7 +152,7 @@ wl_cursor_image_get_buffer(struct wl_cursor_image *_img)
 						  image->offset,
 						  _img->width, _img->height,
 						  _img->width * 4,
-						  WL_SHM_FORMAT_ARGB8888);
+						  WL_BUFFER_FORMAT_ARGB8888);
 	};
 
 	return image->buffer;
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 54fb9e0..f75a224 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -196,11 +196,6 @@
       <entry name="invalid_fd" value="2"/>
     </enum>
 
-    <enum name="format">
-      <entry name="argb8888" value="0"/>
-      <entry name="xrgb8888" value="1"/>
-    </enum>
-
     <request name="create_pool">
       <description summary="create a shm pool">
 	This creates wl_shm_pool object, which can be used to create
@@ -220,6 +215,13 @@
   </interface>
 
   <interface name="wl_buffer" version="1">
+    <enum name="format">
+      <entry name="argb8888" value="1"/>
+      <entry name="xrgb8888" value="2"/>
+      <entry name="yuv420" value="3"/>
+      <entry name="nv12" value="4"/>
+    </enum>
+
     <description summary="content for a wl_surface">
       A buffer provides the content for a wl_surface.  Buffers are
       created through factory interfaces such as wl_drm, wl_shm or
diff --git a/src/wayland-server.h b/src/wayland-server.h
index 18a8beb..14969f8 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -178,6 +178,7 @@ struct wl_resource {
 struct wl_buffer {
 	struct wl_resource resource;
 	int32_t width, height;
+	uint32_t format;
 	uint32_t busy_count;
 };
 
@@ -425,9 +426,6 @@ wl_shm_buffer_get_data(struct wl_buffer *buffer);
 int32_t
 wl_shm_buffer_get_stride(struct wl_buffer *buffer);
 
-uint32_t
-wl_shm_buffer_get_format(struct wl_buffer *buffer);
-
 int
 wl_buffer_is_shm(struct wl_buffer *buffer);
 
diff --git a/src/wayland-shm.c b/src/wayland-shm.c
index 62afc3b..15598a2 100644
--- a/src/wayland-shm.c
+++ b/src/wayland-shm.c
@@ -45,7 +45,6 @@ struct wl_shm_pool {
 struct wl_shm_buffer {
 	struct wl_buffer buffer;
 	int32_t stride;
-	uint32_t format;
 	int offset;
 	struct wl_shm_pool *pool;
 };
@@ -92,8 +91,8 @@ shm_pool_create_buffer(struct wl_client *client, struct wl_resource *resource,
 	struct wl_shm_buffer *buffer;
 
 	switch (format) {
-	case WL_SHM_FORMAT_ARGB8888:
-	case WL_SHM_FORMAT_XRGB8888:
+	case WL_BUFFER_FORMAT_ARGB8888:
+	case WL_BUFFER_FORMAT_XRGB8888:
 		break;
 	default:
 		wl_resource_post_error(resource,
@@ -120,8 +119,8 @@ shm_pool_create_buffer(struct wl_client *client, struct wl_resource *resource,
 
 	buffer->buffer.width = width;
 	buffer->buffer.height = height;
+	buffer->buffer.format = format;
 	buffer->buffer.busy_count = 0;
-	buffer->format = format;
 	buffer->stride = stride;
 	buffer->offset = offset;
 	buffer->pool = pool;
@@ -237,8 +236,8 @@ bind_shm(struct wl_client *client,
 	resource = wl_client_add_object(client, &wl_shm_interface,
 					&shm_interface, id, data);
 
-	wl_shm_send_format(resource, WL_SHM_FORMAT_ARGB8888);
-	wl_shm_send_format(resource, WL_SHM_FORMAT_XRGB8888);
+	wl_shm_send_format(resource, WL_BUFFER_FORMAT_ARGB8888);
+	wl_shm_send_format(resource, WL_BUFFER_FORMAT_XRGB8888);
 }
 
 WL_EXPORT int
@@ -278,11 +277,3 @@ wl_shm_buffer_get_data(struct wl_buffer *buffer_base)
 
 	return buffer->pool->data + buffer->offset;
 }
-
-WL_EXPORT uint32_t
-wl_shm_buffer_get_format(struct wl_buffer *buffer_base)
-{
-	struct wl_shm_buffer *buffer = (struct wl_shm_buffer *) buffer_base;
-
-	return buffer->format;
-}
