diff options
| author | Cody Northrop <cody@lunarg.com> | 2014-12-09 19:08:33 -0700 |
|---|---|---|
| committer | Cody Northrop <cody@lunarg.com> | 2014-12-10 16:29:04 -0700 |
| commit | 52c51260f99b1a03985674cda24893d9fa98a4a2 (patch) | |
| tree | 678c2b12e7962e5a0ca29a7800d92063b6368bc3 | |
| parent | 574dca6542a7b82bb287a9f4df1832f11d9a66a3 (diff) | |
| download | usermoji-52c51260f99b1a03985674cda24893d9fa98a4a2.tar.xz | |
xgl: Add new resource type for textures
This change modifies xgl.h to include a new descriptor set
slot type for textures, distinct from resources:
XGL_SLOT_SHADER_TEXTURE_RESOURCE
Buffers continue to use:
XGL_SLOT_SHADER_RESOURCE
The ordering of their inclusion in binding tables entries is
important: textures must come before buffers. This is how
the compiler expects them to be laid out.
| -rw-r--r-- | include/xgl.h | 7 | ||||
| -rw-r--r-- | layers/draw_state.c | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/xgl.h b/include/xgl.h index 52a5f80d..f28aa22c 100644 --- a/include/xgl.h +++ b/include/xgl.h @@ -288,8 +288,13 @@ typedef enum _XGL_DESCRIPTOR_SET_SLOT_TYPE XGL_SLOT_SHADER_SAMPLER = 0x00000003, XGL_SLOT_NEXT_DESCRIPTOR_SET = 0x00000004, + // LUNARG CHANGE BEGIN - differentiate between textures and buffers + XGL_SLOT_SHADER_TEXTURE_RESOURCE = 0x00000005, + XGL_DESCRIPTOR_SET_SLOT_TYPE_BEGIN_RANGE = XGL_SLOT_UNUSED, - XGL_DESCRIPTOR_SET_SLOT_TYPE_END_RANGE = XGL_SLOT_NEXT_DESCRIPTOR_SET, + XGL_DESCRIPTOR_SET_SLOT_TYPE_END_RANGE = XGL_SLOT_SHADER_TEXTURE_RESOURCE, + // LUNARG CHANGE END + XGL_NUM_DESCRIPTOR_SET_SLOT_TYPE = (XGL_DESCRIPTOR_SET_SLOT_TYPE_END_RANGE - XGL_DESCRIPTOR_SET_SLOT_TYPE_BEGIN_RANGE + 1), XGL_MAX_ENUM(_XGL_DESCRIPTOR_SET_SLOT_TYPE) } XGL_DESCRIPTOR_SET_SLOT_TYPE; diff --git a/layers/draw_state.c b/layers/draw_state.c index 75193b89..1e8b1635 100644 --- a/layers/draw_state.c +++ b/layers/draw_state.c @@ -760,6 +760,7 @@ static XGL_BOOL verifyShaderSlotMapping(const XGL_UINT slot, const XGL_UINT slot char str[1024]; switch (shaderMapping) { + case XGL_SLOT_SHADER_TEXTURE_RESOURCE: case XGL_SLOT_SHADER_RESOURCE: if (MAPPING_MEMORY != slotBinding && MAPPING_IMAGE != slotBinding) error = XGL_TRUE; |
