| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "command_buffer/common/cross/cmd_buffer_format.h" | 41 #include "command_buffer/common/cross/cmd_buffer_format.h" |
| 42 #include "command_buffer/common/cross/resource.h" | 42 #include "command_buffer/common/cross/resource.h" |
| 43 #include "command_buffer/client/cross/cmd_buffer_helper.h" | 43 #include "command_buffer/client/cross/cmd_buffer_helper.h" |
| 44 #include "command_buffer/client/cross/fenced_allocator.h" | 44 #include "command_buffer/client/cross/fenced_allocator.h" |
| 45 | 45 |
| 46 namespace o3d { | 46 namespace o3d { |
| 47 | 47 |
| 48 using command_buffer::CommandBufferEntry; | 48 using command_buffer::CommandBufferEntry; |
| 49 using command_buffer::CommandBufferHelper; | 49 using command_buffer::CommandBufferHelper; |
| 50 using command_buffer::FencedAllocatorWrapper; | 50 using command_buffer::FencedAllocatorWrapper; |
| 51 using command_buffer::ResourceID; | 51 using command_buffer::ResourceId; |
| 52 namespace texture = command_buffer::texture; | 52 namespace texture = command_buffer::texture; |
| 53 namespace set_texture_data_cmd = command_buffer::set_texture_data_cmd; | |
| 54 namespace get_texture_data_cmd = command_buffer::get_texture_data_cmd; | |
| 55 namespace create_texture_2d_cmd = command_buffer::create_texture_2d_cmd; | |
| 56 namespace create_texture_cube_cmd = command_buffer::create_texture_cube_cmd; | |
| 57 | 53 |
| 58 namespace { | 54 namespace { |
| 59 | 55 |
| 60 const Texture::RGBASwizzleIndices g_cb_abgr32f_swizzle_indices = | 56 const Texture::RGBASwizzleIndices g_cb_abgr32f_swizzle_indices = |
| 61 {0, 1, 2, 3}; | 57 {0, 1, 2, 3}; |
| 62 | 58 |
| 63 // Converts an O3D texture format to a command buffer texture format. | 59 // Converts an O3D texture format to a command buffer texture format. |
| 64 texture::Format CBFormatFromO3DFormat(Texture::Format format) { | 60 texture::Format CBFormatFromO3DFormat(Texture::Format format) { |
| 65 switch (format) { | 61 switch (format) { |
| 66 case Texture::XRGB8: | 62 case Texture::XRGB8: |
| 67 return texture::XRGB8; | 63 return texture::kXRGB8; |
| 68 case Texture::ARGB8: | 64 case Texture::ARGB8: |
| 69 return texture::ARGB8; | 65 return texture::kARGB8; |
| 70 case Texture::ABGR16F: | 66 case Texture::ABGR16F: |
| 71 return texture::ABGR16F; | 67 return texture::kABGR16F; |
| 72 case Texture::DXT1: | 68 case Texture::DXT1: |
| 73 return texture::DXT1; | 69 return texture::kDXT1; |
| 74 // TODO: DXT3/5. It's not yet supported by the command buffer | 70 // TODO: DXT3/5. It's not yet supported by the command buffer |
| 75 // renderer, though it would be a simple addition. | 71 // renderer, though it would be a simple addition. |
| 76 default: | 72 default: |
| 77 break; | 73 break; |
| 78 } | 74 } |
| 79 // failed to find a matching format | 75 // failed to find a matching format |
| 80 LOG(ERROR) << "Unrecognized Texture format type."; | 76 LOG(ERROR) << "Unrecognized Texture format type."; |
| 81 return texture::NUM_FORMATS; | 77 return texture::kNumFormats; |
| 82 } | 78 } |
| 83 | 79 |
| 84 // Checks that enums match in value, so that they can be directly used in | 80 // Checks that enums match in value, so that they can be directly used in |
| 85 // set_texture_data_cmd::Face bitfields. | 81 // SetTextureData::Face bitfields. |
| 86 COMPILE_ASSERT(TextureCUBE::FACE_POSITIVE_X == texture::FACE_POSITIVE_X, | 82 COMPILE_ASSERT(TextureCUBE::FACE_POSITIVE_X == texture::kFacePositiveX, |
| 87 FACE_POSITIVE_X_enums_don_t_match); | 83 FACE_POSITIVE_X_enums_don_t_match); |
| 88 COMPILE_ASSERT(TextureCUBE::FACE_NEGATIVE_X == texture::FACE_NEGATIVE_X, | 84 COMPILE_ASSERT(TextureCUBE::FACE_NEGATIVE_X == texture::kFaceNegativeX, |
| 89 FACE_NEGATIVE_X_enums_don_t_match); | 85 FACE_NEGATIVE_X_enums_don_t_match); |
| 90 COMPILE_ASSERT(TextureCUBE::FACE_POSITIVE_Y == texture::FACE_POSITIVE_Y, | 86 COMPILE_ASSERT(TextureCUBE::FACE_POSITIVE_Y == texture::kFacePositiveY, |
| 91 FACE_POSITIVE_Y_enums_don_t_match); | 87 FACE_POSITIVE_Y_enums_don_t_match); |
| 92 COMPILE_ASSERT(TextureCUBE::FACE_NEGATIVE_Y == texture::FACE_NEGATIVE_Y, | 88 COMPILE_ASSERT(TextureCUBE::FACE_NEGATIVE_Y == texture::kFaceNegativeY, |
| 93 FACE_NEGATIVE_Y_enums_don_t_match); | 89 FACE_NEGATIVE_Y_enums_don_t_match); |
| 94 COMPILE_ASSERT(TextureCUBE::FACE_POSITIVE_Z == texture::FACE_POSITIVE_Z, | 90 COMPILE_ASSERT(TextureCUBE::FACE_POSITIVE_Z == texture::kFacePositiveZ, |
| 95 FACE_POSITIVE_Z_enums_don_t_match); | 91 FACE_POSITIVE_Z_enums_don_t_match); |
| 96 COMPILE_ASSERT(TextureCUBE::FACE_NEGATIVE_Z == texture::FACE_NEGATIVE_Z, | 92 COMPILE_ASSERT(TextureCUBE::FACE_NEGATIVE_Z == texture::kFaceNegativeZ, |
| 97 FACE_NEGATIVE_Z_enums_don_t_match); | 93 FACE_NEGATIVE_Z_enums_don_t_match); |
| 98 | 94 |
| 99 // Writes the data information into a buffer to be sent to the server side. | 95 // Writes the data information into a buffer to be sent to the server side. |
| 100 void SetTextureDataBuffer(Texture::Format format, | 96 void SetTextureDataBuffer(Texture::Format format, |
| 101 const void* src_data, | 97 const void* src_data, |
| 102 int src_pitch, | 98 int src_pitch, |
| 103 unsigned src_width, | 99 unsigned src_width, |
| 104 unsigned src_height, | 100 unsigned src_height, |
| 105 void* dst_buffer, | 101 void* dst_buffer, |
| 106 unsigned int dst_pitch) { | 102 unsigned int dst_pitch) { |
| 107 const uint8* src = static_cast<const uint8*>(src_data); | 103 const uint8* src = static_cast<const uint8*>(src_data); |
| 108 uint8* dst = static_cast<uint8*>(dst_buffer); | 104 uint8* dst = static_cast<uint8*>(dst_buffer); |
| 109 | 105 |
| 110 size_t bytes_per_row = image::ComputePitch(format, src_width); | 106 size_t bytes_per_row = image::ComputePitch(format, src_width); |
| 111 unsigned num_rows = src_height; | 107 unsigned num_rows = src_height; |
| 112 if (Texture::IsCompressedFormat(format)) { | 108 if (Texture::IsCompressedFormat(format)) { |
| 113 num_rows = (num_rows + 3) / 4; | 109 num_rows = (num_rows + 3) / 4; |
| 114 } | 110 } |
| 115 | 111 |
| 116 for (unsigned yy = 0; yy < num_rows; ++yy) { | 112 for (unsigned yy = 0; yy < num_rows; ++yy) { |
| 117 memcpy(dst, src, bytes_per_row); | 113 memcpy(dst, src, bytes_per_row); |
| 118 src += src_pitch; | 114 src += src_pitch; |
| 119 dst += dst_pitch; | 115 dst += dst_pitch; |
| 120 } | 116 } |
| 121 } | 117 } |
| 122 | 118 |
| 123 // Sends the SetTextureData command after formatting the args properly. | 119 // Sends the SetTextureData command after formatting the args properly. |
| 124 void SetTextureData(RendererCB *renderer, | 120 void SetTextureData(RendererCB *renderer, |
| 125 ResourceID texture_id, | 121 ResourceId texture_id, |
| 126 unsigned int x, | 122 unsigned int x, |
| 127 unsigned int y, | 123 unsigned int y, |
| 128 unsigned int mip_width, | 124 unsigned int mip_width, |
| 129 unsigned int mip_height, | 125 unsigned int mip_height, |
| 130 unsigned int z, | 126 unsigned int z, |
| 131 unsigned int depth, | 127 unsigned int depth, |
| 132 unsigned int level, | 128 unsigned int level, |
| 133 TextureCUBE::CubeFace face, | 129 TextureCUBE::CubeFace face, |
| 134 int pitch, | 130 int pitch, |
| 135 size_t mip_size, | 131 size_t mip_size, |
| 136 unsigned char* mip_data) { | 132 unsigned char* mip_data) { |
| 137 FencedAllocatorWrapper *allocator = renderer->allocator(); | 133 FencedAllocatorWrapper *allocator = renderer->allocator(); |
| 138 CommandBufferHelper *helper = renderer->helper(); | 134 CommandBufferHelper *helper = renderer->helper(); |
| 139 helper->SetTextureData( | 135 helper->SetTextureData( |
| 140 texture_id, | 136 texture_id, |
| 141 x, y, z, | 137 x, y, z, |
| 142 mip_width, mip_height, depth, | 138 mip_width, mip_height, depth, |
| 143 level, face, | 139 level, static_cast<texture::Face>(face), |
| 144 pitch, | 140 pitch, |
| 145 0, // slice_pitch | 141 0, // slice_pitch |
| 146 mip_size, | 142 mip_size, |
| 147 renderer->transfer_shm_id(), | 143 renderer->transfer_shm_id(), |
| 148 allocator->GetOffset(mip_data)); | 144 allocator->GetOffset(mip_data)); |
| 149 allocator->FreePendingToken(mip_data, helper->InsertToken()); | 145 allocator->FreePendingToken(mip_data, helper->InsertToken()); |
| 150 } | 146 } |
| 151 // Updates a command buffer texture resource from a bitmap, rescaling if | 147 // Updates a command buffer texture resource from a bitmap, rescaling if |
| 152 // necessary. | 148 // necessary. |
| 153 void UpdateResourceFromBitmap(RendererCB *renderer, | 149 void UpdateResourceFromBitmap(RendererCB *renderer, |
| 154 ResourceID texture_id, | 150 ResourceId texture_id, |
| 155 unsigned int level, | 151 unsigned int level, |
| 156 TextureCUBE::CubeFace face, | 152 TextureCUBE::CubeFace face, |
| 157 const Bitmap &bitmap) { | 153 const Bitmap &bitmap) { |
| 158 DCHECK(bitmap.image_data()); | 154 DCHECK(bitmap.image_data()); |
| 159 FencedAllocatorWrapper *allocator = renderer->allocator(); | 155 FencedAllocatorWrapper *allocator = renderer->allocator(); |
| 160 CommandBufferHelper *helper = renderer->helper(); | 156 CommandBufferHelper *helper = renderer->helper(); |
| 161 unsigned int mip_width = std::max(1U, bitmap.width() >> level); | 157 unsigned int mip_width = std::max(1U, bitmap.width() >> level); |
| 162 unsigned int mip_height = std::max(1U, bitmap.height() >> level); | 158 unsigned int mip_height = std::max(1U, bitmap.height() >> level); |
| 163 unsigned char *mip_data = bitmap.GetMipData(level); | 159 unsigned char *mip_data = bitmap.GetMipData(level); |
| 164 size_t mip_size = | 160 size_t mip_size = |
| (...skipping 14 matching lines...) Expand all Loading... |
| 179 1, | 175 1, |
| 180 level, | 176 level, |
| 181 face, | 177 face, |
| 182 pitch, | 178 pitch, |
| 183 mip_size, | 179 mip_size, |
| 184 mip_data); | 180 mip_data); |
| 185 } | 181 } |
| 186 | 182 |
| 187 // Copies back texture resource data into a bitmap. | 183 // Copies back texture resource data into a bitmap. |
| 188 void CopyBackResourceToBitmap(RendererCB *renderer, | 184 void CopyBackResourceToBitmap(RendererCB *renderer, |
| 189 ResourceID texture_id, | 185 ResourceId texture_id, |
| 190 unsigned int level, | 186 unsigned int level, |
| 191 TextureCUBE::CubeFace face, | 187 TextureCUBE::CubeFace face, |
| 192 const Bitmap &bitmap) { | 188 const Bitmap &bitmap) { |
| 193 DCHECK(bitmap.image_data()); | 189 DCHECK(bitmap.image_data()); |
| 194 FencedAllocatorWrapper *allocator = renderer->allocator(); | 190 FencedAllocatorWrapper *allocator = renderer->allocator(); |
| 195 CommandBufferHelper *helper = renderer->helper(); | 191 CommandBufferHelper *helper = renderer->helper(); |
| 196 unsigned int mip_width = std::max(1U, bitmap.width() >> level); | 192 unsigned int mip_width = std::max(1U, bitmap.width() >> level); |
| 197 unsigned int mip_height = std::max(1U, bitmap.height() >> level); | 193 unsigned int mip_height = std::max(1U, bitmap.height() >> level); |
| 198 size_t mip_size = | 194 size_t mip_size = |
| 199 image::ComputeBufferSize(mip_width, mip_height, bitmap.format()); | 195 image::ComputeBufferSize(mip_width, mip_height, bitmap.format()); |
| 200 unsigned char *buffer = allocator->AllocTyped<unsigned char>(mip_size); | 196 unsigned char *buffer = allocator->AllocTyped<unsigned char>(mip_size); |
| 201 DCHECK(buffer); | 197 DCHECK(buffer); |
| 202 | 198 |
| 203 size_t pitch = image::ComputeBufferSize(mip_width, 1, bitmap.format()); | 199 size_t pitch = image::ComputeBufferSize(mip_width, 1, bitmap.format()); |
| 204 | 200 |
| 205 helper->GetTextureData( | 201 helper->GetTextureData( |
| 206 texture_id, | 202 texture_id, |
| 207 0, | 203 0, |
| 208 0, | 204 0, |
| 209 0, | 205 0, |
| 210 mip_width, | 206 mip_width, |
| 211 mip_height, | 207 mip_height, |
| 212 1, | 208 1, |
| 213 level, | 209 level, |
| 214 face, | 210 static_cast<texture::Face>(face), |
| 215 pitch, | 211 pitch, |
| 216 0, | 212 0, |
| 217 mip_size, | 213 mip_size, |
| 218 renderer->transfer_shm_id(), | 214 renderer->transfer_shm_id(), |
| 219 allocator->GetOffset(buffer)); | 215 allocator->GetOffset(buffer)); |
| 220 helper->Finish(); | 216 helper->Finish(); |
| 221 memcpy(bitmap.GetMipData(level), buffer, mip_size); | 217 memcpy(bitmap.GetMipData(level), buffer, mip_size); |
| 222 allocator->Free(buffer); | 218 allocator->Free(buffer); |
| 223 } | 219 } |
| 224 | 220 |
| 225 } // anonymous namespace | 221 } // anonymous namespace |
| 226 | 222 |
| 227 static const unsigned int kMaxTextureSize = 2048; | 223 static const unsigned int kMaxTextureSize = 2048; |
| 228 | 224 |
| 229 // Texture2DCB ----------------------------------------------------------------- | 225 // Texture2DCB ----------------------------------------------------------------- |
| 230 | 226 |
| 231 // Constructs a 2D texture object from an existing command-buffer 2D texture | 227 // Constructs a 2D texture object from an existing command-buffer 2D texture |
| 232 // resource. | 228 // resource. |
| 233 // NOTE: the Texture2DCB now owns the texture resource and will destroy it on | 229 // NOTE: the Texture2DCB now owns the texture resource and will destroy it on |
| 234 // exit. | 230 // exit. |
| 235 Texture2DCB::Texture2DCB(ServiceLocator* service_locator, | 231 Texture2DCB::Texture2DCB(ServiceLocator* service_locator, |
| 236 ResourceID resource_id, | 232 ResourceId resource_id, |
| 237 Texture::Format format, | 233 Texture::Format format, |
| 238 int levels, | 234 int levels, |
| 239 int width, | 235 int width, |
| 240 int height, | 236 int height, |
| 241 bool enable_render_surfaces) | 237 bool enable_render_surfaces) |
| 242 : Texture2D(service_locator, | 238 : Texture2D(service_locator, |
| 243 width, | 239 width, |
| 244 height, | 240 height, |
| 245 format, | 241 format, |
| 246 levels, | 242 levels, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 264 Texture2DCB* Texture2DCB::Create(ServiceLocator* service_locator, | 260 Texture2DCB* Texture2DCB::Create(ServiceLocator* service_locator, |
| 265 Texture::Format format, | 261 Texture::Format format, |
| 266 int levels, | 262 int levels, |
| 267 int width, | 263 int width, |
| 268 int height, | 264 int height, |
| 269 bool enable_render_surfaces) { | 265 bool enable_render_surfaces) { |
| 270 DCHECK_NE(format, Texture::UNKNOWN_FORMAT); | 266 DCHECK_NE(format, Texture::UNKNOWN_FORMAT); |
| 271 RendererCB *renderer = static_cast<RendererCB *>( | 267 RendererCB *renderer = static_cast<RendererCB *>( |
| 272 service_locator->GetService<Renderer>()); | 268 service_locator->GetService<Renderer>()); |
| 273 texture::Format cb_format = CBFormatFromO3DFormat(format); | 269 texture::Format cb_format = CBFormatFromO3DFormat(format); |
| 274 if (cb_format == texture::NUM_FORMATS) { | 270 if (cb_format == texture::kNumFormats) { |
| 275 O3D_ERROR(service_locator) | 271 O3D_ERROR(service_locator) |
| 276 << "Unsupported format in Texture2DCB::Create."; | 272 << "Unsupported format in Texture2DCB::Create."; |
| 277 return NULL; | 273 return NULL; |
| 278 } | 274 } |
| 279 if (width > kMaxTextureSize || height > kMaxTextureSize) { | 275 if (width > kMaxTextureSize || height > kMaxTextureSize) { |
| 280 O3D_ERROR(service_locator) << "Texture dimensions (" << width | 276 O3D_ERROR(service_locator) << "Texture dimensions (" << width |
| 281 << ", " << height << ") too big."; | 277 << ", " << height << ") too big."; |
| 282 return NULL; | 278 return NULL; |
| 283 } | 279 } |
| 284 | 280 |
| 285 ResourceID texture_id = renderer->texture_ids().AllocateID(); | 281 ResourceId texture_id = renderer->texture_ids().AllocateID(); |
| 286 renderer->helper()->CreateTexture2d( | 282 renderer->helper()->CreateTexture2d( |
| 287 texture_id, | 283 texture_id, |
| 288 width, height, | 284 width, height, |
| 289 levels, cb_format, enable_render_surfaces); | 285 levels, cb_format, enable_render_surfaces); |
| 290 | 286 |
| 291 Texture2DCB *texture = new Texture2DCB(service_locator, texture_id, | 287 Texture2DCB *texture = new Texture2DCB(service_locator, texture_id, |
| 292 format, levels, width, height, | 288 format, levels, width, height, |
| 293 enable_render_surfaces); | 289 enable_render_surfaces); |
| 294 | 290 |
| 295 return texture; | 291 return texture; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 renderer_)); | 439 renderer_)); |
| 444 } | 440 } |
| 445 | 441 |
| 446 const Texture::RGBASwizzleIndices& Texture2DCB::GetABGR32FSwizzleIndices() { | 442 const Texture::RGBASwizzleIndices& Texture2DCB::GetABGR32FSwizzleIndices() { |
| 447 return g_cb_abgr32f_swizzle_indices; | 443 return g_cb_abgr32f_swizzle_indices; |
| 448 } | 444 } |
| 449 // TextureCUBECB --------------------------------------------------------------- | 445 // TextureCUBECB --------------------------------------------------------------- |
| 450 | 446 |
| 451 // Creates a texture from a pre-existing texture resource. | 447 // Creates a texture from a pre-existing texture resource. |
| 452 TextureCUBECB::TextureCUBECB(ServiceLocator* service_locator, | 448 TextureCUBECB::TextureCUBECB(ServiceLocator* service_locator, |
| 453 ResourceID resource_id, | 449 ResourceId resource_id, |
| 454 Texture::Format format, | 450 Texture::Format format, |
| 455 int levels, | 451 int levels, |
| 456 int edge_length, | 452 int edge_length, |
| 457 bool enable_render_surfaces) | 453 bool enable_render_surfaces) |
| 458 : TextureCUBE(service_locator, | 454 : TextureCUBE(service_locator, |
| 459 edge_length, | 455 edge_length, |
| 460 format, | 456 format, |
| 461 levels, | 457 levels, |
| 462 enable_render_surfaces), | 458 enable_render_surfaces), |
| 463 renderer_(static_cast<RendererCB*>( | 459 renderer_(static_cast<RendererCB*>( |
| (...skipping 15 matching lines...) Expand all Loading... |
| 479 // Create a new Cube texture from scratch. | 475 // Create a new Cube texture from scratch. |
| 480 TextureCUBECB* TextureCUBECB::Create(ServiceLocator* service_locator, | 476 TextureCUBECB* TextureCUBECB::Create(ServiceLocator* service_locator, |
| 481 Texture::Format format, | 477 Texture::Format format, |
| 482 int levels, | 478 int levels, |
| 483 int edge_length, | 479 int edge_length, |
| 484 bool enable_render_surfaces) { | 480 bool enable_render_surfaces) { |
| 485 DCHECK_NE(format, Texture::UNKNOWN_FORMAT); | 481 DCHECK_NE(format, Texture::UNKNOWN_FORMAT); |
| 486 RendererCB *renderer = static_cast<RendererCB *>( | 482 RendererCB *renderer = static_cast<RendererCB *>( |
| 487 service_locator->GetService<Renderer>()); | 483 service_locator->GetService<Renderer>()); |
| 488 texture::Format cb_format = CBFormatFromO3DFormat(format); | 484 texture::Format cb_format = CBFormatFromO3DFormat(format); |
| 489 if (cb_format == texture::NUM_FORMATS) { | 485 if (cb_format == texture::kNumFormats) { |
| 490 O3D_ERROR(service_locator) | 486 O3D_ERROR(service_locator) |
| 491 << "Unsupported format in Texture2DCB::Create."; | 487 << "Unsupported format in Texture2DCB::Create."; |
| 492 return NULL; | 488 return NULL; |
| 493 } | 489 } |
| 494 if (edge_length > kMaxTextureSize) { | 490 if (edge_length > kMaxTextureSize) { |
| 495 O3D_ERROR(service_locator) << "Texture dimensions (" << edge_length | 491 O3D_ERROR(service_locator) << "Texture dimensions (" << edge_length |
| 496 << ", " << edge_length << ") too big."; | 492 << ", " << edge_length << ") too big."; |
| 497 return NULL; | 493 return NULL; |
| 498 } | 494 } |
| 499 | 495 |
| 500 ResourceID texture_id = renderer->texture_ids().AllocateID(); | 496 ResourceId texture_id = renderer->texture_ids().AllocateID(); |
| 501 renderer->helper()->CreateTextureCube( | 497 renderer->helper()->CreateTextureCube( |
| 502 texture_id, | 498 texture_id, |
| 503 edge_length, | 499 edge_length, |
| 504 levels, cb_format, enable_render_surfaces); | 500 levels, cb_format, enable_render_surfaces); |
| 505 | 501 |
| 506 TextureCUBECB* texture = | 502 TextureCUBECB* texture = |
| 507 new TextureCUBECB(service_locator, texture_id, format, levels, | 503 new TextureCUBECB(service_locator, texture_id, format, levels, |
| 508 edge_length, enable_render_surfaces); | 504 edge_length, enable_render_surfaces); |
| 509 | 505 |
| 510 return texture; | 506 return texture; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 face, | 664 face, |
| 669 this, | 665 this, |
| 670 renderer_)); | 666 renderer_)); |
| 671 } | 667 } |
| 672 | 668 |
| 673 const Texture::RGBASwizzleIndices& TextureCUBECB::GetABGR32FSwizzleIndices() { | 669 const Texture::RGBASwizzleIndices& TextureCUBECB::GetABGR32FSwizzleIndices() { |
| 674 return g_cb_abgr32f_swizzle_indices; | 670 return g_cb_abgr32f_swizzle_indices; |
| 675 } | 671 } |
| 676 | 672 |
| 677 } // namespace o3d | 673 } // namespace o3d |
| OLD | NEW |