| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 void SamplerD3D9::SetStates(sampler::AddressingMode addressing_u, | 109 void SamplerD3D9::SetStates(sampler::AddressingMode addressing_u, |
| 110 sampler::AddressingMode addressing_v, | 110 sampler::AddressingMode addressing_v, |
| 111 sampler::AddressingMode addressing_w, | 111 sampler::AddressingMode addressing_w, |
| 112 sampler::FilteringMode mag_filter, | 112 sampler::FilteringMode mag_filter, |
| 113 sampler::FilteringMode min_filter, | 113 sampler::FilteringMode min_filter, |
| 114 sampler::FilteringMode mip_filter, | 114 sampler::FilteringMode mip_filter, |
| 115 unsigned int max_anisotropy) { | 115 unsigned int max_anisotropy) { |
| 116 // These are validated in GAPIDecoder.cc | 116 // These are validated in GAPIDecoder.cc |
| 117 DCHECK_NE(mag_filter, sampler::NONE); | 117 DCHECK_NE(mag_filter, sampler::NONE); |
| 118 DCHECK_NE(min_filter, sampler::NONE); | 118 DCHECK_NE(min_filter, sampler::NONE); |
| 119 DCHECK_GT(max_anisotropy, 0); | 119 DCHECK_GT(max_anisotropy, 0U); |
| 120 d3d_address_u_ = AddressModeToD3D(addressing_u); | 120 d3d_address_u_ = AddressModeToD3D(addressing_u); |
| 121 d3d_address_v_ = AddressModeToD3D(addressing_v); | 121 d3d_address_v_ = AddressModeToD3D(addressing_v); |
| 122 d3d_address_w_ = AddressModeToD3D(addressing_w); | 122 d3d_address_w_ = AddressModeToD3D(addressing_w); |
| 123 d3d_mag_filter_ = FilteringModeToD3D(mag_filter); | 123 d3d_mag_filter_ = FilteringModeToD3D(mag_filter); |
| 124 d3d_min_filter_ = FilteringModeToD3D(min_filter); | 124 d3d_min_filter_ = FilteringModeToD3D(min_filter); |
| 125 d3d_mip_filter_ = FilteringModeToD3D(mip_filter); | 125 d3d_mip_filter_ = FilteringModeToD3D(mip_filter); |
| 126 if (max_anisotropy > 1) { | 126 if (max_anisotropy > 1) { |
| 127 d3d_mag_filter_ = D3DTEXF_ANISOTROPIC; | 127 d3d_mag_filter_ = D3DTEXF_ANISOTROPIC; |
| 128 d3d_min_filter_ = D3DTEXF_ANISOTROPIC; | 128 d3d_min_filter_ = D3DTEXF_ANISOTROPIC; |
| 129 } | 129 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 return BufferSyncInterface::PARSE_INVALID_ARGUMENTS; | 190 return BufferSyncInterface::PARSE_INVALID_ARGUMENTS; |
| 191 // Dirty effect, because this sampler id may be used | 191 // Dirty effect, because this sampler id may be used |
| 192 DirtyEffect(); | 192 DirtyEffect(); |
| 193 sampler->SetTexture(texture_id); | 193 sampler->SetTexture(texture_id); |
| 194 return BufferSyncInterface::PARSE_NO_ERROR; | 194 return BufferSyncInterface::PARSE_NO_ERROR; |
| 195 } | 195 } |
| 196 | 196 |
| 197 | 197 |
| 198 } // namespace command_buffer | 198 } // namespace command_buffer |
| 199 } // namespace o3d | 199 } // namespace o3d |
| OLD | NEW |